mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Updated parser file to the one generated by the latest version of parse.[awk|pl] from the latest version of gram.y
Some small corrections to test suite.
This commit is contained in:
@ -26,10 +26,10 @@ main(void)
|
||||
|
||||
|
||||
#line 16 "test1.pgc"
|
||||
char db [ 200 ] ;
|
||||
char db [ 200 ] ;
|
||||
|
||||
#line 17 "test1.pgc"
|
||||
char pw [ 200 ] ;
|
||||
char pw [ 200 ] ;
|
||||
/* exec sql end declare section */
|
||||
#line 18 "test1.pgc"
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
[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 on line 23: query: alter user connectuser encrypted password 'connectpw'; with 0 parameter(s) 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 on line 23: using PQexec
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
|
@ -98,62 +98,52 @@ struct sqlca_t *ECPGget_sqlca(void);
|
||||
int
|
||||
main ()
|
||||
{
|
||||
/*
|
||||
EXEC SQL BEGIN DECLARE SECTION;
|
||||
char *fname = "/tmp/foo";
|
||||
EXEC SQL END DECLARE SECTION;
|
||||
*/
|
||||
|
||||
ECPGdebug (1, stderr);
|
||||
|
||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
|
||||
#line 19 "copystdout.pgc"
|
||||
#line 13 "copystdout.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint();}
|
||||
#line 19 "copystdout.pgc"
|
||||
#line 13 "copystdout.pgc"
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table foo ( a int , b varchar ) ", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 20 "copystdout.pgc"
|
||||
#line 14 "copystdout.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint();}
|
||||
#line 20 "copystdout.pgc"
|
||||
#line 14 "copystdout.pgc"
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into foo values ( 5 , 'abc' ) ", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 21 "copystdout.pgc"
|
||||
#line 15 "copystdout.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint();}
|
||||
#line 21 "copystdout.pgc"
|
||||
#line 15 "copystdout.pgc"
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into foo values ( 6 , 'def' ) ", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 22 "copystdout.pgc"
|
||||
#line 16 "copystdout.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint();}
|
||||
#line 22 "copystdout.pgc"
|
||||
#line 16 "copystdout.pgc"
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into foo values ( 7 , 'ghi' ) ", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 23 "copystdout.pgc"
|
||||
#line 17 "copystdout.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint();}
|
||||
#line 23 "copystdout.pgc"
|
||||
#line 17 "copystdout.pgc"
|
||||
|
||||
|
||||
/* produces expected file "/tmp/foo" */
|
||||
/* EXEC SQL COPY foo TO:fname WITH DELIMITER ','; */
|
||||
/* printf ("copy to /tmp/foo : sqlca.sqlcode = %ld", sqlca.sqlcode); */
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "copy foo to stdout with delimiter ','", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 29 "copystdout.pgc"
|
||||
#line 19 "copystdout.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint();}
|
||||
#line 29 "copystdout.pgc"
|
||||
#line 19 "copystdout.pgc"
|
||||
|
||||
printf ("copy to STDOUT : sqlca.sqlcode = %ld\n", sqlca.sqlcode);
|
||||
|
||||
{ ECPGdisconnect(__LINE__, "CURRENT");
|
||||
#line 32 "copystdout.pgc"
|
||||
#line 22 "copystdout.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint();}
|
||||
#line 32 "copystdout.pgc"
|
||||
#line 22 "copystdout.pgc"
|
||||
|
||||
|
||||
return 0;
|
||||
|
@ -2,37 +2,37 @@
|
||||
[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]: ecpg_execute on line 20: query: create table foo ( a int , b varchar ) ; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: ecpg_execute on line 14: query: create table foo ( a int , b varchar ) ; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 20: using PQexec
|
||||
[NO_PID]: ecpg_execute on line 14: using PQexec
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 20: OK: CREATE TABLE
|
||||
[NO_PID]: ecpg_execute on line 14: OK: CREATE TABLE
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 21: query: insert into foo values ( 5 , 'abc' ) ; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: ecpg_execute on line 15: query: insert into foo values ( 5 , 'abc' ) ; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 21: using PQexec
|
||||
[NO_PID]: ecpg_execute on line 15: using PQexec
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 21: OK: INSERT 0 1
|
||||
[NO_PID]: ecpg_execute on line 15: OK: INSERT 0 1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 22: query: insert into foo values ( 6 , 'def' ) ; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: ecpg_execute on line 16: query: insert into foo values ( 6 , 'def' ) ; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 22: using PQexec
|
||||
[NO_PID]: ecpg_execute on line 16: using PQexec
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 22: OK: INSERT 0 1
|
||||
[NO_PID]: ecpg_execute on line 16: OK: INSERT 0 1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 23: query: insert into foo values ( 7 , 'ghi' ) ; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: ecpg_execute on line 17: query: insert into foo values ( 7 , 'ghi' ) ; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 23: using PQexec
|
||||
[NO_PID]: ecpg_execute on line 17: using PQexec
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 23: OK: INSERT 0 1
|
||||
[NO_PID]: ecpg_execute on line 17: OK: INSERT 0 1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 29: query: copy foo to stdout with delimiter ','; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: ecpg_execute on line 19: query: copy foo to stdout with delimiter ','; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 29: using PQexec
|
||||
[NO_PID]: ecpg_execute on line 19: using PQexec
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 29: COPY OUT data transfer in progress
|
||||
[NO_PID]: ecpg_execute on line 19: COPY OUT data transfer in progress
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 29: got PGRES_COMMAND_OK after PGRES_COPY_OUT
|
||||
[NO_PID]: ecpg_execute on line 19: got PGRES_COMMAND_OK after PGRES_COPY_OUT
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: connection regress1 closed
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
|
@ -8,12 +8,6 @@ EXEC SQL WHENEVER SQLERROR sqlprint;
|
||||
int
|
||||
main ()
|
||||
{
|
||||
/*
|
||||
EXEC SQL BEGIN DECLARE SECTION;
|
||||
char *fname = "/tmp/foo";
|
||||
EXEC SQL END DECLARE SECTION;
|
||||
*/
|
||||
|
||||
ECPGdebug (1, stderr);
|
||||
|
||||
EXEC SQL CONNECT TO REGRESSDB1;
|
||||
@ -22,10 +16,6 @@ main ()
|
||||
EXEC SQL INSERT INTO foo VALUES (6, 'def');
|
||||
EXEC SQL INSERT INTO foo VALUES (7, 'ghi');
|
||||
|
||||
/* produces expected file "/tmp/foo" */
|
||||
/* EXEC SQL COPY foo TO:fname WITH DELIMITER ','; */
|
||||
/* printf ("copy to /tmp/foo : sqlca.sqlcode = %ld", sqlca.sqlcode); */
|
||||
|
||||
EXEC SQL COPY foo TO STDOUT WITH DELIMITER ',';
|
||||
printf ("copy to STDOUT : sqlca.sqlcode = %ld\n", sqlca.sqlcode);
|
||||
|
||||
|
Reference in New Issue
Block a user