Fix locale dependency in new ecpg test case.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 25 Aug 2017 18:17:33 +0000 (14:17 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 25 Aug 2017 18:17:33 +0000 (14:17 -0400)
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

src/interfaces/ecpg/test/expected/preproc-whenever_do_continue.c
src/interfaces/ecpg/test/expected/preproc-whenever_do_continue.stderr
src/interfaces/ecpg/test/expected/preproc-whenever_do_continue.stdout
src/interfaces/ecpg/test/preproc/.gitignore
src/interfaces/ecpg/test/preproc/whenever_do_continue.pgc

index 2e95581cdfffff5b8cc042b1e5399fe8cd09c7be..a367af00f378deedb3fdfae9c155a8e102c9e5e9 100644 (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();}
index b33329bc0c08c47a65b05ed4618d98fa5859abbb..46bc4a56002453dcd93099bd1bcd333b77aa806d 100644 (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
 [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]: 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: 11110 offset: -1; array: no
+[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:  offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 46: RESULT: 21 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: raising sqlcode -213 on line 46: null value without indicator on line 46
-[NO_PID]: sqlca: code: -213, state: 22002
 [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: josh offset: -1; array: no
+[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: 10000 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 46: RESULT: 11110 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 46: RESULT: 10 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 46: RESULT:  offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode -213 on line 46: null value without indicator on line 46
+[NO_PID]: sqlca: code: -213, state: 22002
 [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: Ram offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 46: RESULT: josh 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]: ecpg_get_data on line 46: RESULT: 10000 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]: ecpg_get_data on line 46: RESULT: 10 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
index 75fb6ce2702cd07136b7a2bdd80fb5106dd8df4c..d6ac5a02806924077f731a08c39a45b09a16e735 100644 (file)
@@ -1,2 +1,2 @@
-josh 10000.00     10.00
 Ram 111100.00     21.00
+josh 10000.00     10.00
index ffca98e8c0a7034c9885361aeef8834a2feea917..fd63e645a3e1d7326e49757cc9de370e2b3f67a8 100644 (file)
@@ -22,3 +22,5 @@
 /variable.c
 /whenever
 /whenever.c
+/whenever_do_continue
+/whenever_do_continue.c
index 8ceda699277e9acc619163003854180e94c0abd1..2a925a3c54ffa6a1f9dfff63f87632d6605cbfae 100644 (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;