mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Synced parser.
Made ecpg parser use backend provided keyword list. Changed whenever test so exit value is 0.
This commit is contained in:
@ -2,68 +2,68 @@
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <DEFAULT>
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute line 23: QUERY: alter user connectuser encrypted password 'connectpw' with 0 parameter on connection main
|
||||
[NO_PID]: ecpg_execute on line 23: query: alter user connectuser encrypted password 'connectpw'; with 0 parameter(s) on connection main
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute line 23: using PQexec
|
||||
[NO_PID]: ecpg_execute on line 23: using PQexec
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute line 23 Ok: ALTER ROLE
|
||||
[NO_PID]: ecpg_execute on line 23: OK: ALTER ROLE
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection main closed.
|
||||
[NO_PID]: ecpg_finish: connection main closed
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <DEFAULT>
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection main closed.
|
||||
[NO_PID]: ecpg_finish: connection main closed
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database <DEFAULT> on localhost port <DEFAULT> for user connectdb
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection main closed.
|
||||
[NO_PID]: ecpg_finish: connection main closed
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <REGRESSION_PORT>
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection main closed.
|
||||
[NO_PID]: ecpg_finish: connection main closed
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database <DEFAULT> on localhost port <REGRESSION_PORT> for user connectdb
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection main closed.
|
||||
[NO_PID]: ecpg_finish: connection main closed
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <REGRESSION_PORT>
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection main closed.
|
||||
[NO_PID]: ecpg_finish: connection main closed
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database <DEFAULT> on <DEFAULT> port <REGRESSION_PORT> for user connectdb
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection main closed.
|
||||
[NO_PID]: ecpg_finish: connection main closed
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <REGRESSION_PORT> for user connectuser
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection connectdb closed.
|
||||
[NO_PID]: ecpg_finish: connection connectdb closed
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database <DEFAULT> on localhost port <REGRESSION_PORT> for user connectdb
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection (null) closed.
|
||||
[NO_PID]: ecpg_finish: connection (null) closed
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <REGRESSION_PORT> for user connectuser
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection connectdb closed.
|
||||
[NO_PID]: ecpg_finish: connection connectdb closed
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <REGRESSION_PORT> for user connectuser
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection connectdb closed.
|
||||
[NO_PID]: ecpg_finish: connection connectdb closed
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <REGRESSION_PORT> with options connect_timeout=14 for user connectuser
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection connectdb closed.
|
||||
[NO_PID]: ecpg_finish: connection connectdb closed
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database nonexistant on localhost port <REGRESSION_PORT> for user connectuser
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: could not open database: FATAL: database "nonexistant" does not exist
|
||||
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection nonexistant closed.
|
||||
[NO_PID]: ecpg_finish: connection nonexistant closed
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: raising sqlcode -402 in line 62, 'Could not connect to database nonexistant in line 62.'.
|
||||
[NO_PID]: raising sqlcode -402 on line 62: could not connect to database "nonexistant" on line 62
|
||||
[NO_PID]: sqlca: code: -402, state: 08001
|
||||
[NO_PID]: raising sqlcode -220 in line 63, 'No such connection CURRENT in line 63.'.
|
||||
[NO_PID]: raising sqlcode -220 on line 63: no such connection CURRENT on line 63
|
||||
[NO_PID]: sqlca: code: -220, state: 08003
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <REGRESSION_PORT> for user connectuser
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
@ -72,9 +72,9 @@
|
||||
TCP/IP connections on port 20?
|
||||
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection connectdb closed.
|
||||
[NO_PID]: ecpg_finish: connection connectdb closed
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: raising sqlcode -402 in line 66, 'Could not connect to database connectdb in line 66.'.
|
||||
[NO_PID]: raising sqlcode -402 on line 66: could not connect to database "connectdb" on line 66
|
||||
[NO_PID]: sqlca: code: -402, state: 08001
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <REGRESSION_PORT> for user connectuser
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
|
@ -220,25 +220,27 @@ if (sqlca.sqlcode < 0) goto error;}
|
||||
/* exec sql whenever sqlerror stop ; */
|
||||
#line 61 "whenever.pgc"
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from nonexistant ", ECPGt_EOIT,
|
||||
/* This cannot fail, thus we don't get an exit value not equal 0. */
|
||||
/* However, it still test the precompiler output. */
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select 1 ", ECPGt_EOIT,
|
||||
ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
|
||||
#line 62 "whenever.pgc"
|
||||
#line 64 "whenever.pgc"
|
||||
|
||||
if (sqlca.sqlwarn[0] == 'W') warn ( );
|
||||
#line 62 "whenever.pgc"
|
||||
#line 64 "whenever.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) exit (1);}
|
||||
#line 62 "whenever.pgc"
|
||||
#line 64 "whenever.pgc"
|
||||
|
||||
{ ECPGtrans(__LINE__, NULL, "rollback");
|
||||
#line 63 "whenever.pgc"
|
||||
#line 65 "whenever.pgc"
|
||||
|
||||
if (sqlca.sqlwarn[0] == 'W') warn ( );
|
||||
#line 63 "whenever.pgc"
|
||||
#line 65 "whenever.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) exit (1);}
|
||||
#line 63 "whenever.pgc"
|
||||
#line 65 "whenever.pgc"
|
||||
|
||||
exit (0);
|
||||
}
|
||||
|
@ -82,11 +82,13 @@ sql error: relation "nonexistant" does not exist on line 47
|
||||
[NO_PID]: sqlca: code: -400, state: 42P01
|
||||
[NO_PID]: ECPGtrans on line 59: action "rollback"; connection "regress1"
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 62: query: select * from nonexistant ; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: ecpg_execute on line 64: query: select 1 ; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 62: using PQexec
|
||||
[NO_PID]: ecpg_execute on line 64: using PQexec
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_check_PQresult on line 62: ERROR: relation "nonexistant" does not exist
|
||||
[NO_PID]: ecpg_execute on line 64: correctly got 1 tuples with 1 fields
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_get_data on line 64: RESULT: 1 offset: -1; array: yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGtrans on line 65: action "rollback"; connection "regress1"
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: raising sqlstate 42P01 (sqlcode -400) on line 62: relation "nonexistant" does not exist on line 62
|
||||
[NO_PID]: sqlca: code: -400, state: 42P01
|
||||
|
@ -59,7 +59,9 @@ int main(void)
|
||||
exec sql rollback;
|
||||
|
||||
exec sql whenever sqlerror stop;
|
||||
exec sql select * into :i from nonexistant;
|
||||
/* This cannot fail, thus we don't get an exit value not equal 0. */
|
||||
/* However, it still test the precompiler output. */
|
||||
exec sql select 1 into :i;
|
||||
exec sql rollback;
|
||||
exit (0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user