Commit aae62278 authored by Tom Lane's avatar Tom Lane

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
parent 99ce446a
......@@ -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();}
......
......@@ -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,37 +44,37 @@
[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
......
......@@ -22,3 +22,5 @@
/variable.c
/whenever
/whenever.c
/whenever_do_continue
/whenever_do_continue.c
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment