1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

- Changed some whitespacing in connect statement.

- Made some chars const as proposed by Stefan Huehner <stefan@huehner.org>.
- Synced parser and keyword lists.
- Copied two token parsing from backend parser to ecpg parser.
- Also added a test case for this.
This commit is contained in:
Michael Meskes
2007-03-17 19:25:24 +00:00
parent e6e78187ef
commit d3e131e062
68 changed files with 778 additions and 317 deletions

View File

@ -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 ( );}

View File

@ -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

View File

@ -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 ( );}

View File

@ -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

View File

@ -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();}

View File

@ -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

View File

@ -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"

View File

@ -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");}

View File

@ -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"

View File

@ -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");}

View File

@ -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 ( );}

View File

@ -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

View File

@ -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 ( );}

View File

@ -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"

View File

@ -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();}

View File

@ -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)

View File

@ -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();}

View File

@ -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

View File

@ -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();}

View File

@ -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();}

View File

@ -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)

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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();}

View File

@ -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

View File

@ -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),

View File

@ -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

View File

@ -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();}

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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 ( );}

View File

@ -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

View File

@ -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 ( );}

View File

@ -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

View File

@ -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();}

View File

@ -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();

View File

@ -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

View File

@ -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;\

View File

@ -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

View File

@ -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");}

View File

@ -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

View File

@ -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;
}

View File

@ -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

View File

@ -0,0 +1,3 @@
item[0] = 1
item[1] = 2
item[2] = -1

View File

@ -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();

View File

@ -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

View File

@ -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"

View File

@ -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),

View File

@ -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

View File

@ -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();}

View File

@ -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();}

View File

@ -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

View File

@ -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;
}