diff options
Diffstat (limited to 'src/interfaces/ecpg/test')
55 files changed, 339 insertions, 135 deletions
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rnull.c b/src/interfaces/ecpg/test/expected/compat_informix-rnull.c index 84acd62309b..a70e154f498 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-rnull.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-rnull.c @@ -99,14 +99,14 @@ int main(void) #line 27 "rnull.pgc" - { ECPGconnect(__LINE__, 1, "regress1" , NULL,NULL , NULL, 0); + { ECPGconnect(__LINE__, 1, "regress1" , NULL, NULL , NULL, 0); #line 29 "rnull.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} #line 29 "rnull.pgc" - { ECPGdo(__LINE__, 1, 0, NULL, "create table test ( id int , c char ( 10 ) , s smallint , i int , b bool , f float , l bigint , dbl double precision , dec decimal , dat date , tmp timestamptz ) ", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 1, 0, NULL, "create table test ( id int , c char ( 10 ) , s smallint , i int , b bool , f float , l bigint , dbl double precision , dec decimal , dat date , tmp timestamptz ) ", ECPGt_EOIT, ECPGt_EORT); #line 33 "rnull.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rnull.stderr b/src/interfaces/ecpg/test/expected/compat_informix-rnull.stderr index 2574e45121a..b1bce4b81aa 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-rnull.stderr +++ b/src/interfaces/ecpg/test/expected/compat_informix-rnull.stderr @@ -2,19 +2,19 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT> [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 31: QUERY: create table test ( id int , c char ( 10 ) , s smallint , i int , b bool , f float , l bigint , dbl double precision , dec decimal , dat date , tmp timestamptz ) on connection regress1 +[NO_PID]: ECPGexecute line 31: QUERY: create table test ( id int , c char ( 10 ) , s smallint , i int , b bool , f float , l bigint , dbl double precision , dec decimal , dat date , tmp timestamptz ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 31 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 34 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36: QUERY: insert into test ( id , c , s , i , b , f , l , dbl ) values( 1 , 'abc ' , 17 , -74874 , 't' , 3.710000038147 , 487444 , 404.404 ) on connection regress1 +[NO_PID]: ECPGexecute line 36: QUERY: insert into test ( id , c , s , i , b , f , l , dbl ) values ( 1 , 'abc ' , 17 , -74874 , 't' , 3.710000038147 , 487444 , 404.404 ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 36 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 39 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: QUERY: insert into test ( id , c , s , i , b , f , l , dbl , dec , dat , tmp ) values( 2 , null , null , null , 't' , null , null , null , null , null , null ) on connection regress1 +[NO_PID]: ECPGexecute line 52: QUERY: insert into test ( id , c , s , i , b , f , l , dbl , dec , dat , tmp ) values ( 2 , null , null , null , 't' , null , null , null , null , null , null ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 52 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c b/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c index bd36a2a5e33..e05f009094d 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c @@ -50,7 +50,7 @@ int main(void) #line 18 "test_informix.pgc" - { ECPGconnect(__LINE__, 1, "regress1" , NULL,NULL , NULL, 0); + { ECPGconnect(__LINE__, 1, "regress1" , NULL, NULL , NULL, 0); #line 20 "test_informix.pgc" if (sqlca.sqlcode < 0) dosqlprint ( );} @@ -127,7 +127,7 @@ if (sqlca.sqlcode < 0) dosqlprint ( );} /* this however should be ok */ - { ECPGdo(__LINE__, 1, 1, NULL, "select i from test where j = ( select j from test order by i limit 1 ) ", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 1, 1, NULL, "select i from test where j = ( select j from test order by i limit 1 ) ", ECPGt_EOIT, ECPGt_EORT); #line 43 "test_informix.pgc" if (sqlca.sqlcode < 0) dosqlprint ( );} diff --git a/src/interfaces/ecpg/test/expected/compat_informix-test_informix.stderr b/src/interfaces/ecpg/test/expected/compat_informix-test_informix.stderr index c902584ca4f..f669c687623 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-test_informix.stderr +++ b/src/interfaces/ecpg/test/expected/compat_informix-test_informix.stderr @@ -6,13 +6,13 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 23 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 27: QUERY: insert into test ( i , j ) values( 7 , 0 ) on connection regress1 +[NO_PID]: ECPGexecute line 27: QUERY: insert into test ( i , j ) values ( 7 , 0 ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 27 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 28 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 31: QUERY: insert into test ( i , j ) values( 7 , 12 ) on connection regress1 +[NO_PID]: ECPGexecute line 31: QUERY: insert into test ( i , j ) values ( 7 , 12 ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 31: Error: ERROR: duplicate key violates unique constraint "test_pkey" [NO_PID]: sqlca: code: 0, state: 00000 @@ -20,7 +20,7 @@ [NO_PID]: sqlca: code: -239, state: 23505 [NO_PID]: ECPGtrans line 33 action = rollback connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: QUERY: insert into test ( i , j ) values( 14 , 1 ) on connection regress1 +[NO_PID]: ECPGexecute line 35: QUERY: insert into test ( i , j ) values ( 14 , 1 ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 35 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -34,7 +34,7 @@ [NO_PID]: sqlca: code: -284, state: 21000 [NO_PID]: ECPGtrans line 40 action = rollback connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 43: QUERY: select i from test where j = ( select j from test order by i limit 1 ) on connection regress1 +[NO_PID]: ECPGexecute line 43: QUERY: select i from test where j = ( select j from test order by i limit 1 ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 43: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 @@ -64,7 +64,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlcode 100 in line 54, 'No data found in line 54.'. [NO_PID]: sqlca: code: 100, state: 02000 -[NO_PID]: ECPGexecute line 72: QUERY: delete from test where i = 21.0 on connection regress1 +[NO_PID]: ECPGexecute line 72: QUERY: delete from test where i = 21.0 on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 72 Ok: DELETE 0 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c index db94fdf86e9..1c2f8b4e2df 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c @@ -172,7 +172,7 @@ int main(void) ECPGdebug(1, stderr); strcpy(dbname, "regress1"); - { ECPGconnect(__LINE__, 1, dbname , NULL,NULL , NULL, 0); + { ECPGconnect(__LINE__, 1, dbname , NULL, NULL , NULL, 0); #line 63 "test_informix2.pgc" if (sqlca.sqlcode < 0) sqlprint();} diff --git a/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.stderr b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.stderr index b15e87d4363..bd21af0a4df 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.stderr +++ b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.stderr @@ -10,7 +10,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 68 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: QUERY: insert into history ( customerid , timestamp , action_taken , narrative ) values( 1 , '2003-05-07 13:28:34 CEST' , 'test' , 'test' ) on connection regress1 +[NO_PID]: ECPGexecute line 71: QUERY: insert into history ( customerid , timestamp , action_taken , narrative ) values ( 1 , '2003-05-07 13:28:34 CEST' , 'test' , 'test' ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 71 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -28,7 +28,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_data line 81: RESULT: Wed 07 May 13:28:34 2003 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 95: QUERY: insert into history ( customerid , timestamp , action_taken , narrative ) values( 2 , timestamp '2003-05-08 15:53:39' , 'test' , 'test' ) on connection regress1 +[NO_PID]: ECPGexecute line 95: QUERY: insert into history ( customerid , timestamp , action_taken , narrative ) values ( 2 , timestamp '2003-05-08 15:53:39' , 'test' , 'test' ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 95 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/connect-test2.c b/src/interfaces/ecpg/test/expected/connect-test2.c index a5ab29da3f5..15c2e8af8cb 100644 --- a/src/interfaces/ecpg/test/expected/connect-test2.c +++ b/src/interfaces/ecpg/test/expected/connect-test2.c @@ -48,10 +48,10 @@ main(void) ECPGdebug(1, stderr); strcpy(id, "first"); - { ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , id, 0); } + { ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , id, 0); } #line 24 "test2.pgc" - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , "second", 0); } + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , "second", 0); } #line 25 "test2.pgc" diff --git a/src/interfaces/ecpg/test/expected/connect-test3.c b/src/interfaces/ecpg/test/expected/connect-test3.c index f601f9b9005..9d4f2c1511f 100644 --- a/src/interfaces/ecpg/test/expected/connect-test3.c +++ b/src/interfaces/ecpg/test/expected/connect-test3.c @@ -47,10 +47,10 @@ main(void) ECPGdebug(1, stderr); strcpy(id, "first"); - { ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , id, 0); } + { ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , id, 0); } #line 23 "test3.pgc" - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , "second", 0); } + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , "second", 0); } #line 24 "test3.pgc" @@ -71,7 +71,7 @@ main(void) #line 31 "test3.pgc" - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , "second", 0); } + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , "second", 0); } #line 33 "test3.pgc" /* will close "second" */ @@ -79,7 +79,7 @@ main(void) #line 35 "test3.pgc" - { ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , "second", 0); } + { ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "second", 0); } #line 37 "test3.pgc" { ECPGdisconnect(__LINE__, "ALL");} diff --git a/src/interfaces/ecpg/test/expected/connect-test4.c b/src/interfaces/ecpg/test/expected/connect-test4.c index 42c017471e8..dac589419c4 100644 --- a/src/interfaces/ecpg/test/expected/connect-test4.c +++ b/src/interfaces/ecpg/test/expected/connect-test4.c @@ -29,7 +29,7 @@ main(void) { ECPGdebug(1, stderr); - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , "main", 0); } + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , "main", 0); } #line 13 "test4.pgc" diff --git a/src/interfaces/ecpg/test/expected/connect-test5.c b/src/interfaces/ecpg/test/expected/connect-test5.c index b226b46a03f..0e52e193079 100644 --- a/src/interfaces/ecpg/test/expected/connect-test5.c +++ b/src/interfaces/ecpg/test/expected/connect-test5.c @@ -37,7 +37,7 @@ main(void) ECPGdebug(1, stderr); - { ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , "main", 0); } + { ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); } #line 22 "test5.pgc" { ECPGdo(__LINE__, 0, 1, NULL, "alter user connectuser encrypted password 'connectpw'", ECPGt_EOIT, ECPGt_EORT);} @@ -49,28 +49,28 @@ main(void) strcpy(db, "connectdb"); strcpy(id, "main"); - { ECPGconnect(__LINE__, 0, db , NULL,NULL , id, 0); } + { ECPGconnect(__LINE__, 0, db , NULL, NULL , id, 0); } #line 28 "test5.pgc" { ECPGdisconnect(__LINE__, id);} #line 29 "test5.pgc" - { ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , "main", 0); } + { ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); } #line 31 "test5.pgc" { ECPGdisconnect(__LINE__, "main");} #line 32 "test5.pgc" - { ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , "main", 0); } + { ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); } #line 34 "test5.pgc" { ECPGdisconnect(__LINE__, "main");} #line 35 "test5.pgc" - { ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , "main", 0); } + { ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); } #line 37 "test5.pgc" { ECPGdisconnect(__LINE__, "main");} @@ -127,10 +127,10 @@ main(void) /* connect twice */ - { ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , "main", 0); } + { ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); } #line 62 "test5.pgc" - { ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , "main", 0); } + { ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); } #line 63 "test5.pgc" { ECPGdisconnect(__LINE__, "main");} diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c index 413ff7acd05..46ef2959ab4 100644 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c +++ b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c @@ -60,13 +60,13 @@ main(void) /* exec sql whenever sqlerror do sqlprint ( ) ; */ #line 27 "dt_test.pgc" - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); #line 28 "dt_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} #line 28 "dt_test.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "create table date_test ( d date , ts timestamp ) ", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 0, 1, NULL, "create table date_test ( d date , ts timestamp ) ", ECPGt_EOIT, ECPGt_EORT); #line 29 "dt_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stderr b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stderr index 8f984c66755..bb2f8d2959e 100644 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stderr +++ b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stderr @@ -2,7 +2,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT> [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29: QUERY: create table date_test ( d date , ts timestamp ) on connection regress1 +[NO_PID]: ECPGexecute line 29: QUERY: create table date_test ( d date , ts timestamp ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 29 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 @@ -10,7 +10,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 30 Ok: SET [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: QUERY: insert into date_test ( d , ts ) values( date '1966-01-17' , timestamp '2000-07-12 17:34:29' ) on connection regress1 +[NO_PID]: ECPGexecute line 35: QUERY: insert into date_test ( d , ts ) values ( date '1966-01-17' , timestamp '2000-07-12 17:34:29' ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 35 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c index 48d0e6f9b1a..4053e52fcc5 100644 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c +++ b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c @@ -55,7 +55,7 @@ main(void) #line 30 "num_test.pgc" - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); #line 32 "num_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} diff --git a/src/interfaces/ecpg/test/expected/preproc-comment.c b/src/interfaces/ecpg/test/expected/preproc-comment.c index 57cd4f5e2ad..cb0f84758bb 100644 --- a/src/interfaces/ecpg/test/expected/preproc-comment.c +++ b/src/interfaces/ecpg/test/expected/preproc-comment.c @@ -32,7 +32,7 @@ int main(void) { ECPGdebug(1, stderr); - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); } + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); } #line 17 "comment.pgc" diff --git a/src/interfaces/ecpg/test/expected/preproc-define.c b/src/interfaces/ecpg/test/expected/preproc-define.c index 44cd6eecc56..89d6b83575e 100644 --- a/src/interfaces/ecpg/test/expected/preproc-define.c +++ b/src/interfaces/ecpg/test/expected/preproc-define.c @@ -71,7 +71,7 @@ main(void) ECPGdebug(1, stderr); - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); #line 34 "define.pgc" if (sqlca.sqlcode < 0) sqlprint();} diff --git a/src/interfaces/ecpg/test/expected/preproc-type.c b/src/interfaces/ecpg/test/expected/preproc-type.c index 68805fa2536..1677b03ba78 100644 --- a/src/interfaces/ecpg/test/expected/preproc-type.c +++ b/src/interfaces/ecpg/test/expected/preproc-type.c @@ -111,7 +111,7 @@ main (void) ECPGdebug (1, stderr); empl.idnum = 1; - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); } + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); } #line 43 "type.pgc" if (sqlca.sqlcode) diff --git a/src/interfaces/ecpg/test/expected/preproc-variable.c b/src/interfaces/ecpg/test/expected/preproc-variable.c index a6beea09c80..34682ebf30b 100644 --- a/src/interfaces/ecpg/test/expected/preproc-variable.c +++ b/src/interfaces/ecpg/test/expected/preproc-variable.c @@ -120,7 +120,7 @@ main (void) ECPGdebug(1, stderr); strcpy(msg, "connect"); - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); #line 43 "variable.pgc" if (sqlca.sqlcode < 0) sqlprint();} @@ -136,7 +136,7 @@ if (sqlca.sqlcode < 0) sqlprint();} strcpy(msg, "create"); - { ECPGdo(__LINE__, 0, 1, NULL, "create table family ( name char ( 8 ) , born integer , age smallint , married date , children integer ) ", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 0, 1, NULL, "create table family ( name char ( 8 ) , born integer , age smallint , married date , children integer ) ", ECPGt_EOIT, ECPGt_EORT); #line 49 "variable.pgc" if (sqlca.sqlcode < 0) sqlprint();} diff --git a/src/interfaces/ecpg/test/expected/preproc-variable.stderr b/src/interfaces/ecpg/test/expected/preproc-variable.stderr index 3fc175378eb..01b21c804d7 100644 --- a/src/interfaces/ecpg/test/expected/preproc-variable.stderr +++ b/src/interfaces/ecpg/test/expected/preproc-variable.stderr @@ -6,7 +6,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 46 Ok: SET [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 49: QUERY: create table family ( name char ( 8 ) , born integer , age smallint , married date , children integer ) on connection regress1 +[NO_PID]: ECPGexecute line 49: QUERY: create table family ( name char ( 8 ) , born integer , age smallint , married date , children integer ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 49 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/preproc-whenever.c b/src/interfaces/ecpg/test/expected/preproc-whenever.c index 63a7d09f293..3acb4ece4f1 100644 --- a/src/interfaces/ecpg/test/expected/preproc-whenever.c +++ b/src/interfaces/ecpg/test/expected/preproc-whenever.c @@ -59,7 +59,7 @@ int main(void) ECPGdebug(1, stderr); - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); #line 31 "whenever.pgc" if (sqlca.sqlcode < 0) sqlprint();} diff --git a/src/interfaces/ecpg/test/expected/sql-array.c b/src/interfaces/ecpg/test/expected/sql-array.c index fc64d7220d7..2d74c7c899e 100644 --- a/src/interfaces/ecpg/test/expected/sql-array.c +++ b/src/interfaces/ecpg/test/expected/sql-array.c @@ -135,7 +135,7 @@ main (void) ECPGdebug(1, stderr); - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); #line 27 "array.pgc" if (sqlca.sqlcode < 0) sqlprint();} diff --git a/src/interfaces/ecpg/test/expected/sql-binary.c b/src/interfaces/ecpg/test/expected/sql-binary.c index 8c9a5f286ad..dd59da207b1 100644 --- a/src/interfaces/ecpg/test/expected/sql-binary.c +++ b/src/interfaces/ecpg/test/expected/sql-binary.c @@ -66,7 +66,7 @@ main (void) ECPGdebug (1, stderr); empl.idnum = 1; - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); } + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); } #line 28 "binary.pgc" if (sqlca.sqlcode) @@ -75,7 +75,7 @@ main (void) exit (sqlca.sqlcode); } - { ECPGdo(__LINE__, 0, 1, NULL, "create table empl ( idnum integer , name char ( 20 ) , accs smallint , byte bytea ) ", ECPGt_EOIT, ECPGt_EORT);} + { ECPGdo(__LINE__, 0, 1, NULL, "create table empl ( idnum integer , name char ( 20 ) , accs smallint , byte bytea ) ", ECPGt_EOIT, ECPGt_EORT);} #line 36 "binary.pgc" if (sqlca.sqlcode) diff --git a/src/interfaces/ecpg/test/expected/sql-binary.stderr b/src/interfaces/ecpg/test/expected/sql-binary.stderr index 8b589b7c641..42eef431f07 100644 --- a/src/interfaces/ecpg/test/expected/sql-binary.stderr +++ b/src/interfaces/ecpg/test/expected/sql-binary.stderr @@ -2,7 +2,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT> [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: QUERY: create table empl ( idnum integer , name char ( 20 ) , accs smallint , byte bytea ) on connection regress1 +[NO_PID]: ECPGexecute line 35: QUERY: create table empl ( idnum integer , name char ( 20 ) , accs smallint , byte bytea ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 35 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-code100.c b/src/interfaces/ecpg/test/expected/sql-code100.c index 96822bedcff..efff83aa5d6 100644 --- a/src/interfaces/ecpg/test/expected/sql-code100.c +++ b/src/interfaces/ecpg/test/expected/sql-code100.c @@ -106,12 +106,12 @@ int main(int argc, char **argv) ECPGdebug(1,stderr); - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); } + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); } #line 15 "code100.pgc" if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc); - { ECPGdo(__LINE__, 0, 1, NULL, "create table test ( \"index\" numeric ( 3 ) primary key , \"payload\" int4 not null ) ", ECPGt_EOIT, ECPGt_EORT);} + { ECPGdo(__LINE__, 0, 1, NULL, "create table test ( \"index\" numeric ( 3 ) primary key , \"payload\" int4 not null ) ", ECPGt_EOIT, ECPGt_EORT);} #line 20 "code100.pgc" if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc); diff --git a/src/interfaces/ecpg/test/expected/sql-code100.stderr b/src/interfaces/ecpg/test/expected/sql-code100.stderr index 8f1432dbfbe..83fd9c2ac58 100644 --- a/src/interfaces/ecpg/test/expected/sql-code100.stderr +++ b/src/interfaces/ecpg/test/expected/sql-code100.stderr @@ -2,67 +2,67 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT> [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 18: QUERY: create table test ( "index" numeric ( 3 ) primary key , "payload" int4 not null ) on connection regress1 +[NO_PID]: ECPGexecute line 18: QUERY: create table test ( "index" numeric ( 3 ) primary key , "payload" int4 not null ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 18 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 22 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values( 0 , 0 ) on connection regress1 +[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , 0 ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values( 0 , 1 ) on connection regress1 +[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , 1 ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values( 0 , 2 ) on connection regress1 +[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , 2 ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values( 0 , 3 ) on connection regress1 +[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , 3 ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values( 0 , 4 ) on connection regress1 +[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , 4 ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values( 0 , 5 ) on connection regress1 +[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , 5 ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values( 0 , 6 ) on connection regress1 +[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , 6 ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values( 0 , 7 ) on connection regress1 +[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , 7 ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values( 0 , 8 ) on connection regress1 +[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , 8 ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values( 0 , 9 ) on connection regress1 +[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , 9 ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 31 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 34: QUERY: update test set payload = payload + 1 where index = - 1 on connection regress1 +[NO_PID]: ECPGexecute line 34: QUERY: update test set payload = payload + 1 where index = - 1 on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 34 Ok: UPDATE 0 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlcode 100 in line 34, 'No data found in line 34.'. [NO_PID]: sqlca: code: 100, state: 02000 -[NO_PID]: ECPGexecute line 38: QUERY: delete from test where index = - 1 on connection regress1 +[NO_PID]: ECPGexecute line 38: QUERY: delete from test where index = - 1 on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 38 Ok: DELETE 0 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlcode 100 in line 38, 'No data found in line 38.'. [NO_PID]: sqlca: code: 100, state: 02000 -[NO_PID]: ECPGexecute line 41: QUERY: insert into test ( select * from test where index = - 1 ) on connection regress1 +[NO_PID]: ECPGexecute line 41: QUERY: insert into test ( select * from test where index = - 1 ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 41 Ok: INSERT 0 0 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-copystdout.c b/src/interfaces/ecpg/test/expected/sql-copystdout.c index d0356475177..a55dc57bad0 100644 --- a/src/interfaces/ecpg/test/expected/sql-copystdout.c +++ b/src/interfaces/ecpg/test/expected/sql-copystdout.c @@ -107,7 +107,7 @@ main () ECPGdebug (1, stderr); - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); #line 19 "copystdout.pgc" if (sqlca.sqlcode < 0) sqlprint();} diff --git a/src/interfaces/ecpg/test/expected/sql-copystdout.stderr b/src/interfaces/ecpg/test/expected/sql-copystdout.stderr index 0871aea44cb..b56845c1fe1 100644 --- a/src/interfaces/ecpg/test/expected/sql-copystdout.stderr +++ b/src/interfaces/ecpg/test/expected/sql-copystdout.stderr @@ -6,15 +6,15 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 20 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 21: QUERY: insert into foo values( 5 , 'abc' ) on connection regress1 +[NO_PID]: ECPGexecute line 21: QUERY: insert into foo values ( 5 , 'abc' ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 21 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22: QUERY: insert into foo values( 6 , 'def' ) on connection regress1 +[NO_PID]: ECPGexecute line 22: QUERY: insert into foo values ( 6 , 'def' ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 22 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23: QUERY: insert into foo values( 7 , 'ghi' ) on connection regress1 +[NO_PID]: ECPGexecute line 23: QUERY: insert into foo values ( 7 , 'ghi' ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 23 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-define.c b/src/interfaces/ecpg/test/expected/sql-define.c index 69122812c27..eb571ceb314 100644 --- a/src/interfaces/ecpg/test/expected/sql-define.c +++ b/src/interfaces/ecpg/test/expected/sql-define.c @@ -113,14 +113,14 @@ int main(void) /* exec sql whenever sqlerror do sqlprint ( ) ; */ #line 16 "define.pgc" - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); #line 17 "define.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} #line 17 "define.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "create table test ( a int , b text ) ", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 0, 1, NULL, "create table test ( a int , b text ) ", ECPGt_EOIT, ECPGt_EORT); #line 19 "define.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} @@ -157,7 +157,7 @@ if (sqlca.sqlcode < 0) sqlprint ( );} - { ECPGdo(__LINE__, 0, 1, NULL, "select 1 , 29 :: text || '-' || 'abcdef' ", ECPGt_EOIT, + { ECPGdo(__LINE__, 0, 1, NULL, "select 1 , 29 :: text || '-' || 'abcdef' ", ECPGt_EOIT, ECPGt_int,&(i),(long)1,(long)1,sizeof(int), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_char,(s),(long)200,(long)1,(200)*sizeof(char), diff --git a/src/interfaces/ecpg/test/expected/sql-define.stderr b/src/interfaces/ecpg/test/expected/sql-define.stderr index fede000aaa3..7c93e03e862 100644 --- a/src/interfaces/ecpg/test/expected/sql-define.stderr +++ b/src/interfaces/ecpg/test/expected/sql-define.stderr @@ -2,23 +2,23 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT> [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 19: QUERY: create table test ( a int , b text ) on connection regress1 +[NO_PID]: ECPGexecute line 19: QUERY: create table test ( a int , b text ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 19 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 20: QUERY: insert into test values( 29 , 'abcdef' ) on connection regress1 +[NO_PID]: ECPGexecute line 20: QUERY: insert into test values ( 29 , 'abcdef' ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 20 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23: QUERY: insert into test values( null , 'defined' ) on connection regress1 +[NO_PID]: ECPGexecute line 23: QUERY: insert into test values ( null , 'defined' ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 23 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 31: QUERY: insert into test values( null , 'someothervar not defined' ) on connection regress1 +[NO_PID]: ECPGexecute line 31: QUERY: insert into test values ( null , 'someothervar not defined' ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 31 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36: QUERY: select 1 , 29 :: text || '-' || 'abcdef' on connection regress1 +[NO_PID]: ECPGexecute line 36: QUERY: select 1 , 29 :: text || '-' || 'abcdef' on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 36: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 @@ -26,7 +26,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_data line 36: RESULT: 29-abcdef offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 42: QUERY: insert into test values( 29 , 'no string' ) on connection regress1 +[NO_PID]: ECPGexecute line 42: QUERY: insert into test values ( 29 , 'no string' ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 42 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-desc.c b/src/interfaces/ecpg/test/expected/sql-desc.c index 708875a971d..94bfba931d6 100644 --- a/src/interfaces/ecpg/test/expected/sql-desc.c +++ b/src/interfaces/ecpg/test/expected/sql-desc.c @@ -96,14 +96,14 @@ if (sqlca.sqlcode < 0) sqlprint();} #line 25 "desc.pgc" - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); #line 27 "desc.pgc" if (sqlca.sqlcode < 0) sqlprint();} #line 27 "desc.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "create table test1 ( a int , b text ) ", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 0, 1, NULL, "create table test1 ( a int , b text ) ", ECPGt_EOIT, ECPGt_EORT); #line 29 "desc.pgc" if (sqlca.sqlcode < 0) sqlprint();} diff --git a/src/interfaces/ecpg/test/expected/sql-desc.stderr b/src/interfaces/ecpg/test/expected/sql-desc.stderr index 903d59c3d5d..841964bd318 100644 --- a/src/interfaces/ecpg/test/expected/sql-desc.stderr +++ b/src/interfaces/ecpg/test/expected/sql-desc.stderr @@ -2,7 +2,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT> [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29: QUERY: create table test1 ( a int , b text ) on connection regress1 +[NO_PID]: ECPGexecute line 29: QUERY: create table test1 ( a int , b text ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 29 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-dynalloc.c b/src/interfaces/ecpg/test/expected/sql-dynalloc.c index ce178e8ce94..99435a337d1 100644 --- a/src/interfaces/ecpg/test/expected/sql-dynalloc.c +++ b/src/interfaces/ecpg/test/expected/sql-dynalloc.c @@ -171,7 +171,7 @@ int main(void) /* exec sql whenever sqlerror do sqlprint ( ) ; */ #line 32 "dynalloc.pgc" - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); #line 33 "dynalloc.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} @@ -185,7 +185,7 @@ if (sqlca.sqlcode < 0) sqlprint ( );} #line 35 "dynalloc.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "create table test ( a serial , b numeric ( 12 , 3 ) , c varchar , d varchar ( 3 ) , e char ( 4 ) , f timestamptz , g boolean , h box , i inet ) ", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 0, 1, NULL, "create table test ( a serial , b numeric ( 12 , 3 ) , c varchar , d varchar ( 3 ) , e char ( 4 ) , f timestamptz , g boolean , h box , i inet ) ", ECPGt_EOIT, ECPGt_EORT); #line 37 "dynalloc.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} @@ -210,7 +210,7 @@ if (sqlca.sqlcode < 0) sqlprint ( );} if (sqlca.sqlcode < 0) sqlprint ( ); #line 41 "dynalloc.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "select a , b , c , d , e , f , g , h , i from test order by a", ECPGt_EOIT, + { ECPGdo(__LINE__, 0, 1, NULL, "select a , b , c , d , e , f , g , h , i from test order by a ", ECPGt_EOIT, ECPGt_descriptor, "mydesc", 0L, 0L, 0L, ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT); #line 42 "dynalloc.pgc" diff --git a/src/interfaces/ecpg/test/expected/sql-dynalloc.stderr b/src/interfaces/ecpg/test/expected/sql-dynalloc.stderr index aa47dd9146e..6cc0fb296cf 100644 --- a/src/interfaces/ecpg/test/expected/sql-dynalloc.stderr +++ b/src/interfaces/ecpg/test/expected/sql-dynalloc.stderr @@ -6,19 +6,19 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 35 Ok: SET [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37: QUERY: create table test ( a serial , b numeric ( 12 , 3 ) , c varchar , d varchar ( 3 ) , e char ( 4 ) , f timestamptz , g boolean , h box , i inet ) on connection regress1 +[NO_PID]: ECPGexecute line 37: QUERY: create table test ( a serial , b numeric ( 12 , 3 ) , c varchar , d varchar ( 3 ) , e char ( 4 ) , f timestamptz , g boolean , h box , i inet ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 37 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 38: QUERY: insert into test ( b , c , d , e , f , g , h , i ) values( 23.456 , 'varchar' , 'v' , 'c' , '2003-03-03 12:33:07 PDT' , true , '(1,2,3,4)' , '2001:4f8:3:ba:2e0:81ff:fe22:d1f1/128' ) on connection regress1 +[NO_PID]: ECPGexecute line 38: QUERY: insert into test ( b , c , d , e , f , g , h , i ) values ( 23.456 , 'varchar' , 'v' , 'c' , '2003-03-03 12:33:07 PDT' , true , '(1,2,3,4)' , '2001:4f8:3:ba:2e0:81ff:fe22:d1f1/128' ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 38 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39: QUERY: insert into test ( b , c , d , e , f , g , h , i ) values( 2.446456 , null , 'v' , 'c' , '2003-03-03 12:33:07 PDT' , false , null , null ) on connection regress1 +[NO_PID]: ECPGexecute line 39: QUERY: insert into test ( b , c , d , e , f , g , h , i ) values ( 2.446456 , null , 'v' , 'c' , '2003-03-03 12:33:07 PDT' , false , null , null ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 39 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 42: QUERY: select a , b , c , d , e , f , g , h , i from test order by a on connection regress1 +[NO_PID]: ECPGexecute line 42: QUERY: select a , b , c , d , e , f , g , h , i from test order by a on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 42: Correctly got 2 tuples with 9 fields [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-dynalloc2.c b/src/interfaces/ecpg/test/expected/sql-dynalloc2.c index 19fd84fe94d..233ad439709 100644 --- a/src/interfaces/ecpg/test/expected/sql-dynalloc2.c +++ b/src/interfaces/ecpg/test/expected/sql-dynalloc2.c @@ -125,7 +125,7 @@ int main(void) /* exec sql whenever sqlerror do sqlprint ( ) ; */ #line 19 "dynalloc2.pgc" - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); #line 20 "dynalloc2.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} @@ -139,7 +139,7 @@ if (sqlca.sqlcode < 0) sqlprint ( );} #line 22 "dynalloc2.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "create table test ( a int , b text ) ", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 0, 1, NULL, "create table test ( a int , b text ) ", ECPGt_EOIT, ECPGt_EORT); #line 24 "dynalloc2.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} diff --git a/src/interfaces/ecpg/test/expected/sql-dynalloc2.stderr b/src/interfaces/ecpg/test/expected/sql-dynalloc2.stderr index bc103cee829..f7063fd16f9 100644 --- a/src/interfaces/ecpg/test/expected/sql-dynalloc2.stderr +++ b/src/interfaces/ecpg/test/expected/sql-dynalloc2.stderr @@ -6,31 +6,31 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 22 Ok: SET [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 24: QUERY: create table test ( a int , b text ) on connection regress1 +[NO_PID]: ECPGexecute line 24: QUERY: create table test ( a int , b text ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 24 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 25: QUERY: insert into test values( 1 , 'one' ) on connection regress1 +[NO_PID]: ECPGexecute line 25: QUERY: insert into test values ( 1 , 'one' ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 25 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into test values( 2 , 'two' ) on connection regress1 +[NO_PID]: ECPGexecute line 26: QUERY: insert into test values ( 2 , 'two' ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 27: QUERY: insert into test values( null , 'three' ) on connection regress1 +[NO_PID]: ECPGexecute line 27: QUERY: insert into test values ( null , 'three' ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 27 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28: QUERY: insert into test values( 4 , 'four' ) on connection regress1 +[NO_PID]: ECPGexecute line 28: QUERY: insert into test values ( 4 , 'four' ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 28 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29: QUERY: insert into test values( 5 , null ) on connection regress1 +[NO_PID]: ECPGexecute line 29: QUERY: insert into test values ( 5 , null ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 29 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 30: QUERY: insert into test values( null , null ) on connection regress1 +[NO_PID]: ECPGexecute line 30: QUERY: insert into test values ( null , null ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 30 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-dyntest.c b/src/interfaces/ecpg/test/expected/sql-dyntest.c index 242c93a395c..26c56523947 100644 --- a/src/interfaces/ecpg/test/expected/sql-dyntest.c +++ b/src/interfaces/ecpg/test/expected/sql-dyntest.c @@ -219,7 +219,7 @@ if (sqlca.sqlcode < 0) error ( ); #line 45 "dyntest.pgc" - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); #line 47 "dyntest.pgc" if (sqlca.sqlcode < 0) error ( );} @@ -233,7 +233,7 @@ if (sqlca.sqlcode < 0) error ( );} #line 49 "dyntest.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "create table dyntest ( name char ( 14 ) , d float8 , i int , bignumber int8 , b boolean , comment text , day date ) ", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 0, 1, NULL, "create table dyntest ( name char ( 14 ) , d float8 , i int , bignumber int8 , b boolean , comment text , day date ) ", ECPGt_EOIT, ECPGt_EORT); #line 53 "dyntest.pgc" if (sqlca.sqlcode < 0) error ( );} diff --git a/src/interfaces/ecpg/test/expected/sql-dyntest.stderr b/src/interfaces/ecpg/test/expected/sql-dyntest.stderr index fdc4dfedd24..87b46cac842 100644 --- a/src/interfaces/ecpg/test/expected/sql-dyntest.stderr +++ b/src/interfaces/ecpg/test/expected/sql-dyntest.stderr @@ -6,15 +6,15 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 49 Ok: SET [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 51: QUERY: create table dyntest ( name char ( 14 ) , d float8 , i int , bignumber int8 , b boolean , comment text , day date ) on connection regress1 +[NO_PID]: ECPGexecute line 51: QUERY: create table dyntest ( name char ( 14 ) , d float8 , i int , bignumber int8 , b boolean , comment text , day date ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 51 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 54: QUERY: insert into dyntest values( 'first entry' , 14.7 , 14 , 123045607890 , true , 'The world''s most advanced open source database.' , '1987-07-14' ) on connection regress1 +[NO_PID]: ECPGexecute line 54: QUERY: insert into dyntest values ( 'first entry' , 14.7 , 14 , 123045607890 , true , 'The world''s most advanced open source database.' , '1987-07-14' ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 54 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 55: QUERY: insert into dyntest values( 'second entry' , 1407.87 , 1407 , 987065403210 , false , 'The elephant never forgets.' , '1999-11-5' ) on connection regress1 +[NO_PID]: ECPGexecute line 55: QUERY: insert into dyntest values ( 'second entry' , 1407.87 , 1407 , 987065403210 , false , 'The elephant never forgets.' , '1999-11-5' ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 55 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-execute.c b/src/interfaces/ecpg/test/expected/sql-execute.c index 4d0ed38eb04..4e0c78e33c2 100644 --- a/src/interfaces/ecpg/test/expected/sql-execute.c +++ b/src/interfaces/ecpg/test/expected/sql-execute.c @@ -59,7 +59,7 @@ main(void) ECPGdebug(1, stderr); - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , "main", 0); + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , "main", 0); #line 24 "execute.pgc" if (sqlca.sqlcode < 0) sqlprint();} diff --git a/src/interfaces/ecpg/test/expected/sql-fetch.c b/src/interfaces/ecpg/test/expected/sql-fetch.c index 78fc79e8dac..9245e75ee34 100644 --- a/src/interfaces/ecpg/test/expected/sql-fetch.c +++ b/src/interfaces/ecpg/test/expected/sql-fetch.c @@ -38,7 +38,7 @@ int main(int argc, char* argv[]) { ECPGdebug(1, stderr); - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); } + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); } #line 14 "fetch.pgc" @@ -49,7 +49,7 @@ int main(int argc, char* argv[]) { #line 17 "fetch.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "create table My_Table ( Item1 int , Item2 text ) ", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 0, 1, NULL, "create table My_Table ( Item1 int , Item2 text ) ", ECPGt_EOIT, ECPGt_EORT); #line 19 "fetch.pgc" if (sqlca.sqlwarn[0] == 'W') sqlprint(); diff --git a/src/interfaces/ecpg/test/expected/sql-fetch.stderr b/src/interfaces/ecpg/test/expected/sql-fetch.stderr index 10f8ec70b7c..4df892fb2e2 100644 --- a/src/interfaces/ecpg/test/expected/sql-fetch.stderr +++ b/src/interfaces/ecpg/test/expected/sql-fetch.stderr @@ -2,7 +2,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT> [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 19: QUERY: create table My_Table ( Item1 int , Item2 text ) on connection regress1 +[NO_PID]: ECPGexecute line 19: QUERY: create table My_Table ( Item1 int , Item2 text ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 19 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-func.c b/src/interfaces/ecpg/test/expected/sql-func.c index bfa7bbdd944..50b385ee97b 100644 --- a/src/interfaces/ecpg/test/expected/sql-func.c +++ b/src/interfaces/ecpg/test/expected/sql-func.c @@ -26,7 +26,7 @@ int main(int argc, char* argv[]) { ECPGdebug(1, stderr); - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); } + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); } #line 10 "func.pgc" @@ -40,7 +40,7 @@ int main(int argc, char* argv[]) { #line 14 "func.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "create table My_Table ( Item1 int , Item2 text ) ", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 0, 1, NULL, "create table My_Table ( Item1 int , Item2 text ) ", ECPGt_EOIT, ECPGt_EORT); #line 16 "func.pgc" if (sqlca.sqlwarn[0] == 'W') sqlprint(); @@ -50,7 +50,7 @@ if (sqlca.sqlcode < 0) sqlprint();} #line 16 "func.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "create function My_Table_Check () returns trigger as $test$\ + { ECPGdo(__LINE__, 0, 1, NULL, "create function My_Table_Check () returns trigger as $test$\ BEGIN\ RAISE WARNING 'Notice: TG_NAME=%, TG WHEN=%', TG_NAME, TG_WHEN;\ RETURN NEW;\ diff --git a/src/interfaces/ecpg/test/expected/sql-func.stderr b/src/interfaces/ecpg/test/expected/sql-func.stderr index 28697063780..cffe4da7f11 100644 --- a/src/interfaces/ecpg/test/expected/sql-func.stderr +++ b/src/interfaces/ecpg/test/expected/sql-func.stderr @@ -4,11 +4,11 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGsetcommit line 12 action = on connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 16: QUERY: create table My_Table ( Item1 int , Item2 text ) on connection regress1 +[NO_PID]: ECPGexecute line 16: QUERY: create table My_Table ( Item1 int , Item2 text ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 16 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 18: QUERY: create function My_Table_Check () returns trigger as $test$ BEGIN RAISE WARNING 'Notice: TG_NAME=%, TG WHEN=%', TG_NAME, TG_WHEN; RETURN NEW; END; $test$ language plpgsql on connection regress1 +[NO_PID]: ECPGexecute line 18: QUERY: create function My_Table_Check () returns trigger as $test$ BEGIN RAISE WARNING 'Notice: TG_NAME=%, TG WHEN=%', TG_NAME, TG_WHEN; RETURN NEW; END; $test$ language plpgsql on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 18 Ok: CREATE FUNCTION [NO_PID]: sqlca: code: 0, state: 00000 @@ -16,7 +16,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 26 Ok: CREATE TRIGGER [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32: QUERY: insert into My_Table values( 1234 , 'Some random text' ) on connection regress1 +[NO_PID]: ECPGexecute line 32: QUERY: insert into My_Table values ( 1234 , 'Some random text' ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: Notice: TG_NAME=my_table_check_trigger, TG WHEN=BEFORE[NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlcode 0 @@ -24,7 +24,7 @@ [NO_PID]: ECPGexecute line 32 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 01000 sql error Notice: TG_NAME=my_table_check_trigger, TG WHEN=BEFORE -[NO_PID]: ECPGexecute line 33: QUERY: insert into My_Table values( 5678 , 'The Quick Brown' ) on connection regress1 +[NO_PID]: ECPGexecute line 33: QUERY: insert into My_Table values ( 5678 , 'The Quick Brown' ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: Notice: TG_NAME=my_table_check_trigger, TG WHEN=BEFORE[NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlcode 0 diff --git a/src/interfaces/ecpg/test/expected/sql-indicators.c b/src/interfaces/ecpg/test/expected/sql-indicators.c index 99be1bfc396..4d080899a5d 100644 --- a/src/interfaces/ecpg/test/expected/sql-indicators.c +++ b/src/interfaces/ecpg/test/expected/sql-indicators.c @@ -110,14 +110,14 @@ int main(int argc, char **argv) ECPGdebug(1,stderr); - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); } + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); } #line 16 "indicators.pgc" { ECPGsetcommit(__LINE__, "off", NULL);} #line 17 "indicators.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "create table test ( \"id\" int primary key , \"str\" text not null , val int null ) ", ECPGt_EOIT, ECPGt_EORT);} + { ECPGdo(__LINE__, 0, 1, NULL, "create table test ( \"id\" int primary key , \"str\" text not null , val int null ) ", ECPGt_EOIT, ECPGt_EORT);} #line 22 "indicators.pgc" { ECPGtrans(__LINE__, NULL, "commit");} diff --git a/src/interfaces/ecpg/test/expected/sql-indicators.stderr b/src/interfaces/ecpg/test/expected/sql-indicators.stderr index 7fd6b455db8..e31d0fe33fe 100644 --- a/src/interfaces/ecpg/test/expected/sql-indicators.stderr +++ b/src/interfaces/ecpg/test/expected/sql-indicators.stderr @@ -4,21 +4,21 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGsetcommit line 17 action = off connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 19: QUERY: create table test ( "id" int primary key , "str" text not null , val int null ) on connection regress1 +[NO_PID]: ECPGexecute line 19: QUERY: create table test ( "id" int primary key , "str" text not null , val int null ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 19 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 23 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 25: QUERY: insert into test ( id , str , val ) values( 1 , 'Hello' , 0 ) on connection regress1 +[NO_PID]: ECPGexecute line 25: QUERY: insert into test ( id , str , val ) values ( 1 , 'Hello' , 0 ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 25 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28: QUERY: insert into test ( id , str , val ) values( 2 , 'Hi there' , null ) on connection regress1 +[NO_PID]: ECPGexecute line 28: QUERY: insert into test ( id , str , val ) values ( 2 , 'Hi there' , null ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 28 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 30: QUERY: insert into test ( id , str , val ) values( 3 , 'Good evening' , 5 ) on connection regress1 +[NO_PID]: ECPGexecute line 30: QUERY: insert into test ( id , str , val ) values ( 3 , 'Good evening' , 5 ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 30 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -42,7 +42,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_data line 37: RESULT: 5 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 42: QUERY: update test set val = null where id = 1 on connection regress1 +[NO_PID]: ECPGexecute line 42: QUERY: update test set val = null where id = 1 on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 42 Ok: UPDATE 1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-parser.c b/src/interfaces/ecpg/test/expected/sql-parser.c new file mode 100644 index 00000000000..5f41bc9872d --- /dev/null +++ b/src/interfaces/ecpg/test/expected/sql-parser.c @@ -0,0 +1,126 @@ +/* Processed by ecpg (regression mode) */ +/* These include files are added by the preprocessor */ +#include <ecpgtype.h> +#include <ecpglib.h> +#include <ecpgerrno.h> +#include <sqlca.h> +/* End of automatic include section */ +#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) + +#line 1 "parser.pgc" +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +/* test parser addition that merges two tokens into one */ + +#line 1 "regression.h" + + + + + + +#line 6 "parser.pgc" + + +int main(int argc, char* argv[]) { + /* exec sql begin declare section */ + + +#line 10 "parser.pgc" + int item [ 3 ] , ind [ 3 ] , i ; +/* exec sql end declare section */ +#line 11 "parser.pgc" + + + ECPGdebug(1, stderr); + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); } +#line 14 "parser.pgc" + + + { ECPGsetcommit(__LINE__, "on", NULL);} +#line 16 "parser.pgc" + + /* exec sql whenever sql_warning sqlprint ; */ +#line 17 "parser.pgc" + + /* exec sql whenever sqlerror sqlprint ; */ +#line 18 "parser.pgc" + + + { ECPGdo(__LINE__, 0, 1, NULL, "create table T ( Item1 int , Item2 int ) ", ECPGt_EOIT, ECPGt_EORT); +#line 20 "parser.pgc" + +if (sqlca.sqlwarn[0] == 'W') sqlprint(); +#line 20 "parser.pgc" + +if (sqlca.sqlcode < 0) sqlprint();} +#line 20 "parser.pgc" + + + { ECPGdo(__LINE__, 0, 1, NULL, "insert into T values ( 1 , null ) ", ECPGt_EOIT, ECPGt_EORT); +#line 22 "parser.pgc" + +if (sqlca.sqlwarn[0] == 'W') sqlprint(); +#line 22 "parser.pgc" + +if (sqlca.sqlcode < 0) sqlprint();} +#line 22 "parser.pgc" + + { ECPGdo(__LINE__, 0, 1, NULL, "insert into T values ( 1 , 1 ) ", ECPGt_EOIT, ECPGt_EORT); +#line 23 "parser.pgc" + +if (sqlca.sqlwarn[0] == 'W') sqlprint(); +#line 23 "parser.pgc" + +if (sqlca.sqlcode < 0) sqlprint();} +#line 23 "parser.pgc" + + { ECPGdo(__LINE__, 0, 1, NULL, "insert into T values ( 1 , 2 ) ", ECPGt_EOIT, ECPGt_EORT); +#line 24 "parser.pgc" + +if (sqlca.sqlwarn[0] == 'W') sqlprint(); +#line 24 "parser.pgc" + +if (sqlca.sqlcode < 0) sqlprint();} +#line 24 "parser.pgc" + + + { ECPGdo(__LINE__, 0, 1, NULL, "select Item2 from T order by Item2 nulls last", ECPGt_EOIT, + ECPGt_int,(item),(long)1,(long)3,sizeof(int), + ECPGt_int,(ind),(long)1,(long)3,sizeof(int), ECPGt_EORT); +#line 26 "parser.pgc" + +if (sqlca.sqlwarn[0] == 'W') sqlprint(); +#line 26 "parser.pgc" + +if (sqlca.sqlcode < 0) sqlprint();} +#line 26 "parser.pgc" + + + for (i=0; i<3; i++) + printf("item[%d] = %d\n", i, ind[i] ? -1 : item[i]); + + { ECPGdo(__LINE__, 0, 1, NULL, "drop table T ", ECPGt_EOIT, ECPGt_EORT); +#line 31 "parser.pgc" + +if (sqlca.sqlwarn[0] == 'W') sqlprint(); +#line 31 "parser.pgc" + +if (sqlca.sqlcode < 0) sqlprint();} +#line 31 "parser.pgc" + + + { ECPGdisconnect(__LINE__, "ALL"); +#line 33 "parser.pgc" + +if (sqlca.sqlwarn[0] == 'W') sqlprint(); +#line 33 "parser.pgc" + +if (sqlca.sqlcode < 0) sqlprint();} +#line 33 "parser.pgc" + + + return 0; +} diff --git a/src/interfaces/ecpg/test/expected/sql-parser.stderr b/src/interfaces/ecpg/test/expected/sql-parser.stderr new file mode 100644 index 00000000000..f53baa6cd60 --- /dev/null +++ b/src/interfaces/ecpg/test/expected/sql-parser.stderr @@ -0,0 +1,38 @@ +[NO_PID]: ECPGdebug: set to 1 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT> +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGsetcommit line 16 action = on connection = regress1 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGexecute line 20: QUERY: create table T ( Item1 int , Item2 int ) on connection regress1 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGexecute line 20 Ok: CREATE TABLE +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGexecute line 22: QUERY: insert into T values ( 1 , null ) on connection regress1 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGexecute line 22 Ok: INSERT 0 1 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGexecute line 23: QUERY: insert into T values ( 1 , 1 ) on connection regress1 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGexecute line 23 Ok: INSERT 0 1 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGexecute line 24: QUERY: insert into T values ( 1 , 2 ) on connection regress1 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGexecute line 24 Ok: INSERT 0 1 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGexecute line 26: QUERY: select Item2 from T order by Item2 nulls last on connection regress1 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGexecute line 26: Correctly got 3 tuples with 1 fields +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGget_data line 26: RESULT: 1 offset: -1 array: Yes +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGget_data line 26: RESULT: 2 offset: -1 array: Yes +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGget_data line 26: RESULT: offset: -1 array: Yes +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGexecute line 31: QUERY: drop table T on connection regress1 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGexecute line 31 Ok: DROP TABLE +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_finish: Connection regress1 closed. +[NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-parser.stdout b/src/interfaces/ecpg/test/expected/sql-parser.stdout new file mode 100644 index 00000000000..e646ca2da52 --- /dev/null +++ b/src/interfaces/ecpg/test/expected/sql-parser.stdout @@ -0,0 +1,3 @@ +item[0] = 1 +item[1] = 2 +item[2] = -1 diff --git a/src/interfaces/ecpg/test/expected/sql-quote.c b/src/interfaces/ecpg/test/expected/sql-quote.c index 170c27c3dca..b671969f0b7 100644 --- a/src/interfaces/ecpg/test/expected/sql-quote.c +++ b/src/interfaces/ecpg/test/expected/sql-quote.c @@ -34,7 +34,7 @@ int main(int argc, char* argv[]) { ECPGdebug(1, stderr); - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); } + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); } #line 13 "quote.pgc" @@ -48,7 +48,7 @@ int main(int argc, char* argv[]) { #line 17 "quote.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "create table \"My_Table\" ( Item1 int , Item2 text ) ", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 0, 1, NULL, "create table \"My_Table\" ( Item1 int , Item2 text ) ", ECPGt_EOIT, ECPGt_EORT); #line 19 "quote.pgc" if (sqlca.sqlwarn[0] == 'W') sqlprint(); diff --git a/src/interfaces/ecpg/test/expected/sql-quote.stderr b/src/interfaces/ecpg/test/expected/sql-quote.stderr index cb70c7676ca..08a11c4bbeb 100644 --- a/src/interfaces/ecpg/test/expected/sql-quote.stderr +++ b/src/interfaces/ecpg/test/expected/sql-quote.stderr @@ -4,7 +4,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGsetcommit line 15 action = on connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 19: QUERY: create table "My_Table" ( Item1 int , Item2 text ) on connection regress1 +[NO_PID]: ECPGexecute line 19: QUERY: create table "My_Table" ( Item1 int , Item2 text ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 19 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-show.c b/src/interfaces/ecpg/test/expected/sql-show.c index d64b6d29535..d4a7affd800 100644 --- a/src/interfaces/ecpg/test/expected/sql-show.c +++ b/src/interfaces/ecpg/test/expected/sql-show.c @@ -34,7 +34,7 @@ int main(int argc, char* argv[]) { ECPGdebug(1, stderr); - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); } + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); } #line 13 "show.pgc" diff --git a/src/interfaces/ecpg/test/expected/sql-update.c b/src/interfaces/ecpg/test/expected/sql-update.c index ca35ed84375..b3483359f8c 100644 --- a/src/interfaces/ecpg/test/expected/sql-update.c +++ b/src/interfaces/ecpg/test/expected/sql-update.c @@ -34,7 +34,7 @@ int main(int argc, char* argv[]) { ECPGdebug(1, stderr); - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); } + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); } #line 13 "update.pgc" @@ -111,7 +111,7 @@ if (sqlca.sqlcode < 0) sqlprint();} #line 26 "update.pgc" ; - { ECPGdo(__LINE__, 0, 1, NULL, "select a , b from test order by a", ECPGt_EOIT, + { ECPGdo(__LINE__, 0, 1, NULL, "select a , b from test order by a ", ECPGt_EOIT, ECPGt_int,(i1),(long)1,(long)3,sizeof(int), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_int,(i2),(long)1,(long)3,sizeof(int), diff --git a/src/interfaces/ecpg/test/expected/sql-update.stderr b/src/interfaces/ecpg/test/expected/sql-update.stderr index eab4a86c0d0..dcb7822e25b 100644 --- a/src/interfaces/ecpg/test/expected/sql-update.stderr +++ b/src/interfaces/ecpg/test/expected/sql-update.stderr @@ -6,15 +6,15 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 18 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 20: QUERY: insert into test ( a , b ) values( 1 , 1 ) on connection regress1 +[NO_PID]: ECPGexecute line 20: QUERY: insert into test ( a , b ) values ( 1 , 1 ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 20 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 21: QUERY: insert into test ( a , b ) values( 2 , 2 ) on connection regress1 +[NO_PID]: ECPGexecute line 21: QUERY: insert into test ( a , b ) values ( 2 , 2 ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 21 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22: QUERY: insert into test ( a , b ) values( 3 , 3 ) on connection regress1 +[NO_PID]: ECPGexecute line 22: QUERY: insert into test ( a , b ) values ( 3 , 3 ) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 22 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -22,7 +22,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 24 Ok: UPDATE 3 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 25: QUERY: update test set ( a , b )=( 5 , 5 ) where a = 4 on connection regress1 +[NO_PID]: ECPGexecute line 25: QUERY: update test set ( a , b )= ( 5 , 5 ) where a = 4 on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 25 Ok: UPDATE 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -30,7 +30,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 26 Ok: UPDATE 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28: QUERY: select a , b from test order by a on connection regress1 +[NO_PID]: ECPGexecute line 28: QUERY: select a , b from test order by a on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGexecute line 28: Correctly got 3 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/thread-thread.c b/src/interfaces/ecpg/test/expected/thread-thread.c index 41100f7cc34..ae720f4d6e9 100644 --- a/src/interfaces/ecpg/test/expected/thread-thread.c +++ b/src/interfaces/ecpg/test/expected/thread-thread.c @@ -62,7 +62,7 @@ int main(int argc, char *argv[]) /* setup test_thread table */ - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); } + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); } #line 41 "thread.pgc" { ECPGdo(__LINE__, 0, 1, NULL, "drop table test_thread ", ECPGt_EOIT, ECPGt_EORT);} @@ -71,7 +71,7 @@ int main(int argc, char *argv[]) { ECPGtrans(__LINE__, NULL, "commit");} #line 43 "thread.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "create table test_thread ( tstamp timestamp not null default cast( timeofday () as timestamp ) , thread TEXT not null , iteration integer not null , primary key( thread , iteration ) ) ", ECPGt_EOIT, ECPGt_EORT);} + { ECPGdo(__LINE__, 0, 1, NULL, "create table test_thread ( tstamp timestamp not null default cast( timeofday () as timestamp ) , thread TEXT not null , iteration integer not null , primary key( thread , iteration ) ) ", ECPGt_EOIT, ECPGt_EORT);} #line 48 "thread.pgc" { ECPGtrans(__LINE__, NULL, "commit");} @@ -101,7 +101,7 @@ int main(int argc, char *argv[]) free(threads); /* and check results */ - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); } + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); } #line 72 "thread.pgc" { ECPGdo(__LINE__, 0, 1, NULL, "select count (*) from test_thread ", ECPGt_EOIT, @@ -144,7 +144,7 @@ void *test_thread(void *arg) /* exec sql whenever sqlerror sqlprint ; */ #line 94 "thread.pgc" - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , l_connection, 0); + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , l_connection, 0); #line 95 "thread.pgc" if (sqlca.sqlcode < 0) sqlprint();} diff --git a/src/interfaces/ecpg/test/expected/thread-thread_implicit.c b/src/interfaces/ecpg/test/expected/thread-thread_implicit.c index 9a8bbcc434b..c004a7d1167 100644 --- a/src/interfaces/ecpg/test/expected/thread-thread_implicit.c +++ b/src/interfaces/ecpg/test/expected/thread-thread_implicit.c @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) /* setup test_thread table */ - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); } + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); } #line 42 "thread_implicit.pgc" { ECPGdo(__LINE__, 0, 1, NULL, "drop table test_thread ", ECPGt_EOIT, ECPGt_EORT);} @@ -72,7 +72,7 @@ int main(int argc, char *argv[]) { ECPGtrans(__LINE__, NULL, "commit");} #line 44 "thread_implicit.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "create table test_thread ( tstamp timestamp not null default cast( timeofday () as timestamp ) , thread TEXT not null , iteration integer not null , primary key( thread , iteration ) ) ", ECPGt_EOIT, ECPGt_EORT);} + { ECPGdo(__LINE__, 0, 1, NULL, "create table test_thread ( tstamp timestamp not null default cast( timeofday () as timestamp ) , thread TEXT not null , iteration integer not null , primary key( thread , iteration ) ) ", ECPGt_EOIT, ECPGt_EORT);} #line 49 "thread_implicit.pgc" { ECPGtrans(__LINE__, NULL, "commit");} @@ -102,7 +102,7 @@ int main(int argc, char *argv[]) free(threads); /* and check results */ - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); } + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); } #line 73 "thread_implicit.pgc" { ECPGdo(__LINE__, 0, 1, NULL, "select count (*) from test_thread ", ECPGt_EOIT, @@ -145,7 +145,7 @@ void *test_thread(void *arg) /* exec sql whenever sqlerror sqlprint ; */ #line 95 "thread_implicit.pgc" - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , l_connection, 0); + { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , l_connection, 0); #line 96 "thread_implicit.pgc" if (sqlca.sqlcode < 0) sqlprint();} diff --git a/src/interfaces/ecpg/test/sql/Makefile b/src/interfaces/ecpg/test/sql/Makefile index 2a05359400e..01144da9f18 100644 --- a/src/interfaces/ecpg/test/sql/Makefile +++ b/src/interfaces/ecpg/test/sql/Makefile @@ -16,6 +16,7 @@ TESTS = array array.c \ fetch fetch.c \ func func.c \ indicators indicators.c \ + parser parser.c \ quote quote.c \ show show.c \ update update.c diff --git a/src/interfaces/ecpg/test/sql/parser.pgc b/src/interfaces/ecpg/test/sql/parser.pgc new file mode 100644 index 00000000000..97ccedda289 --- /dev/null +++ b/src/interfaces/ecpg/test/sql/parser.pgc @@ -0,0 +1,36 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +/* test parser addition that merges two tokens into one */ +EXEC SQL INCLUDE ../regression; + +int main(int argc, char* argv[]) { + EXEC SQL BEGIN DECLARE SECTION; + int item[3], ind[3], i; + EXEC SQL END DECLARE SECTION; + + ECPGdebug(1, stderr); + EXEC SQL CONNECT TO REGRESSDB1; + + EXEC SQL SET AUTOCOMMIT TO ON; + EXEC SQL WHENEVER SQLWARNING SQLPRINT; + EXEC SQL WHENEVER SQLERROR SQLPRINT; + + EXEC SQL CREATE TABLE T ( Item1 int, Item2 int ); + + EXEC SQL INSERT INTO T VALUES ( 1, null ); + EXEC SQL INSERT INTO T VALUES ( 1, 1 ); + EXEC SQL INSERT INTO T VALUES ( 1, 2 ); + + EXEC SQL SELECT Item2 INTO :item:ind FROM T ORDER BY Item2 NULLS LAST; + + for (i=0; i<3; i++) + printf("item[%d] = %d\n", i, ind[i] ? -1 : item[i]); + + EXEC SQL DROP TABLE T; + + EXEC SQL DISCONNECT ALL; + + return 0; +} |