Fix locale dependency in new ecpg test case.

Force sorting in "C" locale so that the output ordering doesn't vary,
per buildfarm.

In passing, add missing .gitignore entries.

Discussion: https://postgr.es/m/0975f4bb-5dee-c33c-b719-3ce44026d397@chrullrich.net
This commit is contained in:
Tom Lane 2017-08-25 14:17:33 -04:00
parent 99ce446ada
commit aae62278e1
5 changed files with 19 additions and 17 deletions

View File

@ -98,11 +98,11 @@ if (sqlca.sqlcode < 0) sqlprint();}
#line 32 "whenever_do_continue.pgc"
/* declare c cursor for select ename , sal , comm from emp order by ename asc */
/* declare c cursor for select ename , sal , comm from emp order by ename collate \"C\" asc */
#line 34 "whenever_do_continue.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare c cursor for select ename , sal , comm from emp order by ename asc", ECPGt_EOIT, ECPGt_EORT);
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare c cursor for select ename , sal , comm from emp order by ename collate \"C\" asc", ECPGt_EOIT, ECPGt_EORT);
#line 36 "whenever_do_continue.pgc"
if (sqlca.sqlcode < 0) sqlprint();}

View File

@ -32,7 +32,7 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_process_output on line 32: OK: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 36: query: declare c cursor for select ename , sal , comm from emp order by ename asc; with 0 parameter(s) on connection ecpg1_regression
[NO_PID]: ecpg_execute on line 36: query: declare c cursor for select ename , sal , comm from emp order by ename collate "C" asc; with 0 parameter(s) on connection ecpg1_regression
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 36: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
@ -44,6 +44,18 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_process_output on line 46: correctly got 1 tuples with 3 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 46: RESULT: Ram offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 46: RESULT: 111100 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 46: RESULT: 21 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 46: query: fetch c; with 0 parameter(s) on connection ecpg1_regression
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 46: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_process_output on line 46: correctly got 1 tuples with 3 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 46: RESULT: aryan offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 46: RESULT: 11110 offset: -1; array: no
@ -70,18 +82,6 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_process_output on line 46: correctly got 1 tuples with 3 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 46: RESULT: Ram offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 46: RESULT: 111100 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 46: RESULT: 21 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 46: query: fetch c; with 0 parameter(s) on connection ecpg1_regression
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 46: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_process_output on line 46: correctly got 1 tuples with 3 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 46: RESULT: tom offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 46: RESULT: 20000 offset: -1; array: no

View File

@ -1,2 +1,2 @@
josh 10000.00 10.00
Ram 111100.00 21.00
josh 10000.00 10.00

View File

@ -22,3 +22,5 @@
/variable.c
/whenever
/whenever.c
/whenever_do_continue
/whenever_do_continue.c

View File

@ -31,7 +31,7 @@ int main(void)
exec sql insert into emp values ('josh',10000,10);
exec sql insert into emp values ('tom',20000,null);
exec sql declare c cursor for select ename, sal, comm from emp order by ename asc;
exec sql declare c cursor for select ename, sal, comm from emp order by ename collate "C" asc;
exec sql open c;