More SoC stuff
This commit is contained in:
parent
fb9e56eea1
commit
84844bab2c
@ -2103,5 +2103,9 @@ Fr 18. Aug 17:32:54 CEST 2006
|
||||
- Synced parser and keyword list.
|
||||
- Fixed parsing of CONNECT statement so it accepts a C string again.
|
||||
- Fixed a buffer overrun that was masked on Linux systems.
|
||||
|
||||
Sa 19. Aug 14:11:32 CEST 2006
|
||||
|
||||
- More SoC stuff.
|
||||
- Set ecpg library version to 5.2.
|
||||
- Set ecpg version to 4.2.1.
|
||||
|
@ -18,5 +18,5 @@ clean distclean maintainer-clean:
|
||||
-$(MAKE) -C preproc $@
|
||||
-$(MAKE) -C test clean
|
||||
|
||||
check checktcp: all
|
||||
check checktcp installcheck: all
|
||||
$(MAKE) -C test $@
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.57 2006/08/08 19:43:11 tgl Exp $
|
||||
# $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.58 2006/08/19 13:42:40 meskes Exp $
|
||||
|
||||
subdir = src/interfaces/ecpg/test
|
||||
top_builddir = ../../../..
|
||||
@ -61,3 +61,5 @@ check: all pg_regress.inc.sh
|
||||
checktcp: all pg_regress.inc.sh
|
||||
sh ./pg_regress.sh --dbname=regress1 --debug --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) --listen-on-tcp
|
||||
|
||||
installcheck: all pg_regress.inc.sh
|
||||
sh ./pg_regress.sh --dbname=regress1 --debug --top-builddir=$(top_builddir) --load-language=plpgsql $(NOLOCALE)
|
||||
|
@ -63,6 +63,8 @@ int main(void)
|
||||
EXEC SQL connect to :dbname;
|
||||
sql_check("main", "connect", 0);
|
||||
|
||||
EXEC SQL SET DateStyle TO 'DMY';
|
||||
|
||||
EXEC SQL create table history (customerid integer, timestamp timestamp without time zone, action_taken char(5), narrative varchar(100));
|
||||
sql_check("main", "create", 0);
|
||||
|
||||
|
@ -179,29 +179,36 @@ if (sqlca.sqlcode < 0) sqlprint();}
|
||||
|
||||
sql_check("main", "connect", 0);
|
||||
|
||||
{ ECPGdo(__LINE__, 1, 1, NULL, "create table history ( customerid integer , timestamp timestamp without time zone , action_taken char ( 5 ) , narrative varchar ( 100 ) ) ", ECPGt_EOIT, ECPGt_EORT);
|
||||
{ ECPGdo(__LINE__, 1, 1, NULL, "set DateStyle to 'DMY'", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 66 "test_informix2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint();}
|
||||
#line 66 "test_informix2.pgc"
|
||||
|
||||
|
||||
{ ECPGdo(__LINE__, 1, 1, NULL, "create table history ( customerid integer , timestamp timestamp without time zone , action_taken char ( 5 ) , narrative varchar ( 100 ) ) ", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 68 "test_informix2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint();}
|
||||
#line 68 "test_informix2.pgc"
|
||||
|
||||
sql_check("main", "create", 0);
|
||||
|
||||
{ ECPGdo(__LINE__, 1, 1, NULL, "insert into history ( customerid , timestamp , action_taken , narrative ) values( 1 , '2003-05-07 13:28:34 CEST' , 'test' , 'test' )", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 71 "test_informix2.pgc"
|
||||
#line 73 "test_informix2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint();}
|
||||
#line 71 "test_informix2.pgc"
|
||||
#line 73 "test_informix2.pgc"
|
||||
|
||||
sql_check("main", "insert", 0);
|
||||
|
||||
{ ECPGdo(__LINE__, 1, 1, NULL, "select max ( timestamp ) from history ", ECPGt_EOIT,
|
||||
ECPGt_timestamp,&(maxd),(long)1,(long)1,sizeof(timestamp),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
|
||||
#line 76 "test_informix2.pgc"
|
||||
#line 78 "test_informix2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint();}
|
||||
#line 76 "test_informix2.pgc"
|
||||
#line 78 "test_informix2.pgc"
|
||||
|
||||
sql_check("main", "select max", 100);
|
||||
|
||||
@ -212,10 +219,10 @@ if (sqlca.sqlcode < 0) sqlprint();}
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
|
||||
ECPGt_timestamp,&(d),(long)1,(long)1,sizeof(timestamp),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
|
||||
#line 83 "test_informix2.pgc"
|
||||
#line 85 "test_informix2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint();}
|
||||
#line 83 "test_informix2.pgc"
|
||||
#line 85 "test_informix2.pgc"
|
||||
|
||||
sql_check("main", "select", 0);
|
||||
|
||||
@ -231,40 +238,40 @@ if (sqlca.sqlcode < 0) sqlprint();}
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
|
||||
ECPGt_timestamp,&(e),(long)1,(long)1,sizeof(timestamp),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 95 "test_informix2.pgc"
|
||||
#line 97 "test_informix2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint();}
|
||||
#line 95 "test_informix2.pgc"
|
||||
#line 97 "test_informix2.pgc"
|
||||
|
||||
sql_check("main", "update", 0);
|
||||
|
||||
{ ECPGtrans(__LINE__, NULL, "commit");
|
||||
#line 98 "test_informix2.pgc"
|
||||
#line 100 "test_informix2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint();}
|
||||
#line 98 "test_informix2.pgc"
|
||||
#line 100 "test_informix2.pgc"
|
||||
|
||||
|
||||
{ ECPGdo(__LINE__, 1, 1, NULL, "drop table history ", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 100 "test_informix2.pgc"
|
||||
#line 102 "test_informix2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint();}
|
||||
#line 100 "test_informix2.pgc"
|
||||
#line 102 "test_informix2.pgc"
|
||||
|
||||
sql_check("main", "drop", 0);
|
||||
|
||||
{ ECPGtrans(__LINE__, NULL, "commit");
|
||||
#line 103 "test_informix2.pgc"
|
||||
#line 105 "test_informix2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint();}
|
||||
#line 103 "test_informix2.pgc"
|
||||
#line 105 "test_informix2.pgc"
|
||||
|
||||
|
||||
{ ECPGdisconnect(__LINE__, "CURRENT");
|
||||
#line 105 "test_informix2.pgc"
|
||||
#line 107 "test_informix2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint();}
|
||||
#line 105 "test_informix2.pgc"
|
||||
#line 107 "test_informix2.pgc"
|
||||
|
||||
sql_check("main", "disconnect", 0);
|
||||
|
||||
|
@ -2,39 +2,43 @@
|
||||
[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 66: QUERY: create table history ( customerid integer , timestamp timestamp without time zone , action_taken char ( 5 ) , narrative varchar ( 100 ) ) on connection regress1
|
||||
[NO_PID]: ECPGexecute line 66: QUERY: set DateStyle to 'DMY' on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 66 Ok: CREATE TABLE
|
||||
[NO_PID]: ECPGexecute line 66 Ok: SET
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 69: 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 68: QUERY: create table history ( customerid integer , timestamp timestamp without time zone , action_taken char ( 5 ) , narrative varchar ( 100 ) ) on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 69 Ok: INSERT 0 1
|
||||
[NO_PID]: ECPGexecute line 68 Ok: CREATE TABLE
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 74: QUERY: select max ( timestamp ) from history 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 74: Correctly got 1 tuples with 1 fields
|
||||
[NO_PID]: ECPGexecute line 71 Ok: INSERT 0 1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 74: RESULT: Wed May 07 13:28:34 2003 offset: -1 array: Yes
|
||||
[NO_PID]: ECPGexecute line 76: QUERY: select max ( timestamp ) from history on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 79: QUERY: select customerid , timestamp from history where timestamp = timestamp '2003-05-07 13:28:34' limit 1 on connection regress1
|
||||
[NO_PID]: ECPGexecute line 76: Correctly got 1 tuples with 1 fields
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 79: Correctly got 1 tuples with 2 fields
|
||||
[NO_PID]: ECPGget_data line 76: RESULT: Wed 07 May 13:28:34 2003 offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 79: RESULT: 1 offset: -1 array: Yes
|
||||
[NO_PID]: ECPGexecute line 81: QUERY: select customerid , timestamp from history where timestamp = timestamp '2003-05-07 13:28:34' limit 1 on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 79: RESULT: Wed May 07 13:28:34 2003 offset: -1 array: Yes
|
||||
[NO_PID]: ECPGexecute line 81: Correctly got 1 tuples with 2 fields
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 93: 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]: ECPGget_data line 81: RESULT: 1 offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 93 Ok: INSERT 0 1
|
||||
[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]: ECPGtrans line 98 action = commit 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 100: QUERY: drop table history on connection regress1
|
||||
[NO_PID]: ECPGexecute line 95 Ok: INSERT 0 1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 100 Ok: DROP TABLE
|
||||
[NO_PID]: ECPGtrans line 100 action = commit connection = regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGtrans line 103 action = commit connection = regress1
|
||||
[NO_PID]: ECPGexecute line 102: QUERY: drop table history on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 102 Ok: DROP TABLE
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGtrans line 105 action = commit connection = regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection regress1 closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
|
@ -177,101 +177,108 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 33 "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, "set datestyle to mdy", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 35 "dynalloc.pgc"
|
||||
|
||||
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);
|
||||
#line 37 "dynalloc.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 37 "dynalloc.pgc"
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, "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' )", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 36 "dynalloc.pgc"
|
||||
#line 38 "dynalloc.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 36 "dynalloc.pgc"
|
||||
#line 38 "dynalloc.pgc"
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, "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 )", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 37 "dynalloc.pgc"
|
||||
#line 39 "dynalloc.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 37 "dynalloc.pgc"
|
||||
#line 39 "dynalloc.pgc"
|
||||
|
||||
|
||||
ECPGallocate_desc(__LINE__, "mydesc");
|
||||
#line 39 "dynalloc.pgc"
|
||||
#line 41 "dynalloc.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );
|
||||
#line 39 "dynalloc.pgc"
|
||||
#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,
|
||||
ECPGt_descriptor, "mydesc", 0L, 0L, 0L,
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
|
||||
#line 40 "dynalloc.pgc"
|
||||
#line 42 "dynalloc.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 40 "dynalloc.pgc"
|
||||
#line 42 "dynalloc.pgc"
|
||||
|
||||
{ ECPGget_desc(__LINE__, "mydesc", 1,ECPGd_indicator,
|
||||
ECPGt_int,&(i1),(long)1,(long)0,sizeof(int), ECPGd_data,
|
||||
ECPGt_int,&(d1),(long)1,(long)0,sizeof(int), ECPGd_EODT);
|
||||
|
||||
#line 41 "dynalloc.pgc"
|
||||
#line 43 "dynalloc.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 41 "dynalloc.pgc"
|
||||
#line 43 "dynalloc.pgc"
|
||||
|
||||
{ ECPGget_desc(__LINE__, "mydesc", 2,ECPGd_indicator,
|
||||
ECPGt_int,&(i2),(long)1,(long)0,sizeof(int), ECPGd_data,
|
||||
ECPGt_double,&(d2),(long)1,(long)0,sizeof(double), ECPGd_EODT);
|
||||
|
||||
#line 42 "dynalloc.pgc"
|
||||
#line 44 "dynalloc.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 42 "dynalloc.pgc"
|
||||
#line 44 "dynalloc.pgc"
|
||||
|
||||
{ ECPGget_desc(__LINE__, "mydesc", 3,ECPGd_indicator,
|
||||
ECPGt_int,&(i3),(long)1,(long)0,sizeof(int), ECPGd_data,
|
||||
ECPGt_char,&(d3),(long)0,(long)0,(1)*sizeof(char), ECPGd_EODT);
|
||||
|
||||
#line 43 "dynalloc.pgc"
|
||||
#line 45 "dynalloc.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 43 "dynalloc.pgc"
|
||||
#line 45 "dynalloc.pgc"
|
||||
|
||||
{ ECPGget_desc(__LINE__, "mydesc", 4,ECPGd_indicator,
|
||||
ECPGt_int,&(i4),(long)1,(long)0,sizeof(int), ECPGd_data,
|
||||
ECPGt_char,&(d4),(long)0,(long)0,(1)*sizeof(char), ECPGd_EODT);
|
||||
|
||||
#line 44 "dynalloc.pgc"
|
||||
#line 46 "dynalloc.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 44 "dynalloc.pgc"
|
||||
#line 46 "dynalloc.pgc"
|
||||
|
||||
{ ECPGget_desc(__LINE__, "mydesc", 5,ECPGd_indicator,
|
||||
ECPGt_int,&(i5),(long)1,(long)0,sizeof(int), ECPGd_data,
|
||||
ECPGt_char,&(d5),(long)0,(long)0,(1)*sizeof(char), ECPGd_EODT);
|
||||
|
||||
#line 45 "dynalloc.pgc"
|
||||
#line 47 "dynalloc.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 45 "dynalloc.pgc"
|
||||
#line 47 "dynalloc.pgc"
|
||||
|
||||
{ ECPGget_desc(__LINE__, "mydesc", 6,ECPGd_indicator,
|
||||
ECPGt_int,&(i6),(long)1,(long)0,sizeof(int), ECPGd_data,
|
||||
ECPGt_char,&(d6),(long)0,(long)0,(1)*sizeof(char), ECPGd_EODT);
|
||||
|
||||
#line 46 "dynalloc.pgc"
|
||||
#line 48 "dynalloc.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 46 "dynalloc.pgc"
|
||||
#line 48 "dynalloc.pgc"
|
||||
|
||||
{ ECPGget_desc(__LINE__, "mydesc", 7,ECPGd_indicator,
|
||||
ECPGt_int,&(i7),(long)1,(long)0,sizeof(int), ECPGd_data,
|
||||
ECPGt_char,&(d7),(long)0,(long)0,(1)*sizeof(char), ECPGd_EODT);
|
||||
|
||||
#line 47 "dynalloc.pgc"
|
||||
#line 49 "dynalloc.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 47 "dynalloc.pgc"
|
||||
#line 49 "dynalloc.pgc"
|
||||
|
||||
/* skip box for now */
|
||||
/* exec sql get descriptor mydesc value 8 :d8=DATA, :i8=INDICATOR; */
|
||||
@ -279,10 +286,10 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
ECPGt_int,&(i9),(long)1,(long)0,sizeof(int), ECPGd_data,
|
||||
ECPGt_char,&(d9),(long)0,(long)0,(1)*sizeof(char), ECPGd_EODT);
|
||||
|
||||
#line 50 "dynalloc.pgc"
|
||||
#line 52 "dynalloc.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 50 "dynalloc.pgc"
|
||||
#line 52 "dynalloc.pgc"
|
||||
|
||||
|
||||
printf("Result:\n");
|
||||
@ -318,16 +325,16 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
printf("\n");
|
||||
|
||||
ECPGdeallocate_desc(__LINE__, "mydesc");
|
||||
#line 84 "dynalloc.pgc"
|
||||
#line 86 "dynalloc.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );
|
||||
#line 84 "dynalloc.pgc"
|
||||
#line 86 "dynalloc.pgc"
|
||||
|
||||
{ ECPGdisconnect(__LINE__, "CURRENT");
|
||||
#line 85 "dynalloc.pgc"
|
||||
#line 87 "dynalloc.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 85 "dynalloc.pgc"
|
||||
#line 87 "dynalloc.pgc"
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -2,87 +2,91 @@
|
||||
[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 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 35: QUERY: set datestyle to mdy on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 35 Ok: CREATE TABLE
|
||||
[NO_PID]: ECPGexecute line 35 Ok: SET
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 36: 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 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 36 Ok: INSERT 0 1
|
||||
[NO_PID]: ECPGexecute line 37 Ok: CREATE TABLE
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 37: 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 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 37 Ok: INSERT 0 1
|
||||
[NO_PID]: ECPGexecute line 38 Ok: INSERT 0 1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 40: QUERY: select a , b , c , d , e , f , g , h , i from test order by a 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 40: Correctly got 2 tuples with 9 fields
|
||||
[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]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 42: Correctly got 2 tuples with 9 fields
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute putting result (2 tuples) into descriptor 'mydesc'
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGstore_result: line 41: allocating memory for 2 tuples
|
||||
[NO_PID]: ECPGstore_result: line 43: allocating memory for 2 tuples
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 41: RESULT: 1 offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 43: RESULT: 1 offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 41: RESULT: 2 offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 43: RESULT: 2 offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 2
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGstore_result: line 42: allocating memory for 2 tuples
|
||||
[NO_PID]: ECPGstore_result: line 44: allocating memory for 2 tuples
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 42: RESULT: 23.456 offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 44: RESULT: 23.456 offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 42: RESULT: 2.446 offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 44: RESULT: 2.446 offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 3
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGstore_result: line 43: allocating memory for 2 tuples
|
||||
[NO_PID]: ECPGstore_result: line 45: allocating memory for 2 tuples
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 43: RESULT: varchar offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 45: RESULT: varchar offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 43: RESULT: offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 45: RESULT: offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 4
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGstore_result: line 44: allocating memory for 2 tuples
|
||||
[NO_PID]: ECPGstore_result: line 46: allocating memory for 2 tuples
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 44: RESULT: v offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 46: RESULT: v offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 44: RESULT: v offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 46: RESULT: v offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 5
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGstore_result: line 45: allocating memory for 2 tuples
|
||||
[NO_PID]: ECPGstore_result: line 47: allocating memory for 2 tuples
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 45: RESULT: c offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 47: RESULT: c offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 45: RESULT: c offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 47: RESULT: c offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 6
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGstore_result: line 46: allocating memory for 2 tuples
|
||||
[NO_PID]: ECPGstore_result: line 48: allocating memory for 2 tuples
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 46: RESULT: Mon Mar 03 11:33:07 2003 PST offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 48: RESULT: Mon Mar 03 11:33:07 2003 PST offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 46: RESULT: Mon Mar 03 11:33:07 2003 PST offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 48: RESULT: Mon Mar 03 11:33:07 2003 PST offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 7
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGstore_result: line 47: allocating memory for 2 tuples
|
||||
[NO_PID]: ECPGstore_result: line 49: allocating memory for 2 tuples
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 47: RESULT: t offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 49: RESULT: t offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 47: RESULT: f offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 49: RESULT: f offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 9
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGstore_result: line 50: allocating memory for 2 tuples
|
||||
[NO_PID]: ECPGstore_result: line 52: allocating memory for 2 tuples
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 50: RESULT: 2001:4f8:3:ba:2e0:81ff:fe22:d1f1 offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 52: RESULT: 2001:4f8:3:ba:2e0:81ff:fe22:d1f1 offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 50: RESULT: offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 52: RESULT: offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection regress1 closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
|
@ -131,87 +131,94 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 20 "dynalloc2.pgc"
|
||||
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, "create table test ( a int , b text ) ", ECPGt_EOIT, ECPGt_EORT);
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, "set datestyle to postgres", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 22 "dynalloc2.pgc"
|
||||
|
||||
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);
|
||||
#line 24 "dynalloc2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 24 "dynalloc2.pgc"
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, "insert into test values( 1 , 'one' )", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 23 "dynalloc2.pgc"
|
||||
#line 25 "dynalloc2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 23 "dynalloc2.pgc"
|
||||
#line 25 "dynalloc2.pgc"
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, "insert into test values( 2 , 'two' )", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 24 "dynalloc2.pgc"
|
||||
#line 26 "dynalloc2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 24 "dynalloc2.pgc"
|
||||
#line 26 "dynalloc2.pgc"
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, "insert into test values( null , 'three' )", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 25 "dynalloc2.pgc"
|
||||
#line 27 "dynalloc2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 25 "dynalloc2.pgc"
|
||||
#line 27 "dynalloc2.pgc"
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, "insert into test values( 4 , 'four' )", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 26 "dynalloc2.pgc"
|
||||
#line 28 "dynalloc2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 26 "dynalloc2.pgc"
|
||||
#line 28 "dynalloc2.pgc"
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, "insert into test values( 5 , null )", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 27 "dynalloc2.pgc"
|
||||
#line 29 "dynalloc2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 27 "dynalloc2.pgc"
|
||||
#line 29 "dynalloc2.pgc"
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, "insert into test values( null , null )", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 28 "dynalloc2.pgc"
|
||||
#line 30 "dynalloc2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 28 "dynalloc2.pgc"
|
||||
#line 30 "dynalloc2.pgc"
|
||||
|
||||
|
||||
ECPGallocate_desc(__LINE__, "mydesc");
|
||||
#line 30 "dynalloc2.pgc"
|
||||
#line 32 "dynalloc2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );
|
||||
#line 30 "dynalloc2.pgc"
|
||||
#line 32 "dynalloc2.pgc"
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, "select * from test ", ECPGt_EOIT,
|
||||
ECPGt_descriptor, "mydesc", 0L, 0L, 0L,
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
|
||||
#line 31 "dynalloc2.pgc"
|
||||
#line 33 "dynalloc2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 31 "dynalloc2.pgc"
|
||||
#line 33 "dynalloc2.pgc"
|
||||
|
||||
{ ECPGget_desc_header(__LINE__, "mydesc", &(colnum));
|
||||
|
||||
#line 32 "dynalloc2.pgc"
|
||||
#line 34 "dynalloc2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 32 "dynalloc2.pgc"
|
||||
#line 34 "dynalloc2.pgc"
|
||||
|
||||
{ ECPGget_desc(__LINE__, "mydesc", 1,ECPGd_indicator,
|
||||
ECPGt_int,&(ipointer1),(long)1,(long)0,sizeof(int), ECPGd_data,
|
||||
ECPGt_int,&(ip1),(long)1,(long)0,sizeof(int), ECPGd_EODT);
|
||||
|
||||
#line 33 "dynalloc2.pgc"
|
||||
#line 35 "dynalloc2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 33 "dynalloc2.pgc"
|
||||
#line 35 "dynalloc2.pgc"
|
||||
|
||||
{ ECPGget_desc(__LINE__, "mydesc", 2,ECPGd_indicator,
|
||||
ECPGt_int,&(ipointer2),(long)1,(long)0,sizeof(int), ECPGd_data,
|
||||
ECPGt_char,&(cp2),(long)0,(long)0,(1)*sizeof(char), ECPGd_EODT);
|
||||
|
||||
#line 34 "dynalloc2.pgc"
|
||||
#line 36 "dynalloc2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 34 "dynalloc2.pgc"
|
||||
#line 36 "dynalloc2.pgc"
|
||||
|
||||
|
||||
printf("Result (%d columns):\n", colnum);
|
||||
@ -228,22 +235,22 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
printf("\n");
|
||||
|
||||
ECPGdeallocate_desc(__LINE__, "mydesc");
|
||||
#line 49 "dynalloc2.pgc"
|
||||
#line 51 "dynalloc2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );
|
||||
#line 49 "dynalloc2.pgc"
|
||||
#line 51 "dynalloc2.pgc"
|
||||
|
||||
{ ECPGtrans(__LINE__, NULL, "rollback");
|
||||
#line 50 "dynalloc2.pgc"
|
||||
#line 52 "dynalloc2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 50 "dynalloc2.pgc"
|
||||
#line 52 "dynalloc2.pgc"
|
||||
|
||||
{ ECPGdisconnect(__LINE__, "CURRENT");
|
||||
#line 51 "dynalloc2.pgc"
|
||||
#line 53 "dynalloc2.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
#line 51 "dynalloc2.pgc"
|
||||
#line 53 "dynalloc2.pgc"
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -2,37 +2,41 @@
|
||||
[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 22: QUERY: create table test ( a int , b text ) on connection regress1
|
||||
[NO_PID]: ECPGexecute line 22: QUERY: set datestyle to postgres on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 22 Ok: CREATE TABLE
|
||||
[NO_PID]: ECPGexecute line 22 Ok: SET
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 23: QUERY: insert into test values( 1 , 'one' ) 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 23 Ok: INSERT 0 1
|
||||
[NO_PID]: ECPGexecute line 24 Ok: CREATE TABLE
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 24: QUERY: insert into test values( 2 , 'two' ) 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 25: QUERY: insert into test values( null , 'three' ) 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( 4 , 'four' ) 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( 5 , null ) 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( null , null ) 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 31: QUERY: select * from test 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 31: Correctly got 6 tuples with 2 fields
|
||||
[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]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 30 Ok: INSERT 0 1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 33: QUERY: select * from test on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 33: Correctly got 6 tuples with 2 fields
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute putting result (6 tuples) into descriptor 'mydesc'
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
@ -40,37 +44,37 @@
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGstore_result: line 33: allocating memory for 6 tuples
|
||||
[NO_PID]: ECPGstore_result: line 35: allocating memory for 6 tuples
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 33: RESULT: 1 offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 35: RESULT: 1 offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 33: RESULT: 2 offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 35: RESULT: 2 offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 33: RESULT: offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 35: RESULT: offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 33: RESULT: 4 offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 35: RESULT: 4 offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 33: RESULT: 5 offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 35: RESULT: 5 offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 33: RESULT: offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 35: RESULT: offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 2
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGstore_result: line 34: allocating memory for 6 tuples
|
||||
[NO_PID]: ECPGstore_result: line 36: allocating memory for 6 tuples
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 34: RESULT: one offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 36: RESULT: one offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 34: RESULT: two offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 36: RESULT: two offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 34: RESULT: three offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 36: RESULT: three offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 34: RESULT: four offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 36: RESULT: four offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 34: RESULT: offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 36: RESULT: offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 34: RESULT: offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 36: RESULT: offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGtrans line 50 action = rollback connection = regress1
|
||||
[NO_PID]: ECPGtrans line 52 action = rollback connection = regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection regress1 closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
|
@ -225,42 +225,49 @@ if (sqlca.sqlcode < 0) error ( );}
|
||||
#line 47 "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);
|
||||
#line 51 "dyntest.pgc"
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, "set datestyle to german", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 49 "dyntest.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) error ( );}
|
||||
#line 51 "dyntest.pgc"
|
||||
#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);
|
||||
#line 53 "dyntest.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) error ( );}
|
||||
#line 53 "dyntest.pgc"
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, "insert into dyntest values( 'first entry' , 14.7 , 14 , 123045607890 , true , 'The world''s most advanced open source database.' , '1987-07-14' )", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 52 "dyntest.pgc"
|
||||
#line 54 "dyntest.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) error ( );}
|
||||
#line 52 "dyntest.pgc"
|
||||
#line 54 "dyntest.pgc"
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, "insert into dyntest values( 'second entry' , 1407.87 , 1407 , 987065403210 , false , 'The elephant never forgets.' , '1999-11-5' )", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 53 "dyntest.pgc"
|
||||
#line 55 "dyntest.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) error ( );}
|
||||
#line 53 "dyntest.pgc"
|
||||
#line 55 "dyntest.pgc"
|
||||
|
||||
|
||||
{ ECPGprepare(__LINE__, "MYQUERY" , QUERY);
|
||||
#line 55 "dyntest.pgc"
|
||||
#line 57 "dyntest.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) error ( );}
|
||||
#line 55 "dyntest.pgc"
|
||||
#line 57 "dyntest.pgc"
|
||||
|
||||
/* declare MYCURS cursor for ? */
|
||||
#line 56 "dyntest.pgc"
|
||||
#line 58 "dyntest.pgc"
|
||||
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, "declare MYCURS cursor for ?",
|
||||
ECPGt_char_variable,(ECPGprepared_statement("MYQUERY")),(long)1,(long)1,(1)*sizeof(char),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 58 "dyntest.pgc"
|
||||
#line 60 "dyntest.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) error ( );}
|
||||
#line 58 "dyntest.pgc"
|
||||
#line 60 "dyntest.pgc"
|
||||
|
||||
|
||||
while (1)
|
||||
@ -268,10 +275,10 @@ if (sqlca.sqlcode < 0) error ( );}
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, "fetch in MYCURS", ECPGt_EOIT,
|
||||
ECPGt_descriptor, "MYDESC", 0L, 0L, 0L,
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
|
||||
#line 62 "dyntest.pgc"
|
||||
#line 64 "dyntest.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) error ( );}
|
||||
#line 62 "dyntest.pgc"
|
||||
#line 64 "dyntest.pgc"
|
||||
|
||||
|
||||
if (sqlca.sqlcode)
|
||||
@ -279,10 +286,10 @@ if (sqlca.sqlcode < 0) error ( );}
|
||||
|
||||
{ ECPGget_desc_header(__LINE__, "MYDESC", &(COUNT));
|
||||
|
||||
#line 67 "dyntest.pgc"
|
||||
#line 69 "dyntest.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) error ( );}
|
||||
#line 67 "dyntest.pgc"
|
||||
#line 69 "dyntest.pgc"
|
||||
|
||||
if (!done)
|
||||
{
|
||||
@ -302,10 +309,10 @@ if (sqlca.sqlcode < 0) error ( );}
|
||||
ECPGt_int,&(LENGTH),(long)1,(long)1,sizeof(int), ECPGd_type,
|
||||
ECPGt_int,&(TYPE),(long)1,(long)1,sizeof(int), ECPGd_EODT);
|
||||
|
||||
#line 84 "dyntest.pgc"
|
||||
#line 86 "dyntest.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) error ( );}
|
||||
#line 84 "dyntest.pgc"
|
||||
#line 86 "dyntest.pgc"
|
||||
|
||||
printf ("%2d\t%s (type: %d length: %d precision: %d scale: %d = " , INDEX, NAME, TYPE, LENGTH, PRECISION, SCALE);
|
||||
switch (TYPE)
|
||||
@ -338,10 +345,10 @@ if (sqlca.sqlcode < 0) error ( );}
|
||||
{ ECPGget_desc(__LINE__, "MYDESC", INDEX,ECPGd_di_code,
|
||||
ECPGt_int,&(DATETIME_INTERVAL_CODE),(long)1,(long)1,sizeof(int), ECPGd_EODT);
|
||||
|
||||
#line 114 "dyntest.pgc"
|
||||
#line 116 "dyntest.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) error ( );}
|
||||
#line 114 "dyntest.pgc"
|
||||
#line 116 "dyntest.pgc"
|
||||
|
||||
switch (DATETIME_INTERVAL_CODE)
|
||||
{
|
||||
@ -395,10 +402,10 @@ if (sqlca.sqlcode < 0) error ( );}
|
||||
{ ECPGget_desc(__LINE__, "MYDESC", INDEX,ECPGd_data,
|
||||
ECPGt_bool,&(BOOLVAR),(long)1,(long)1,sizeof(bool), ECPGd_EODT);
|
||||
|
||||
#line 164 "dyntest.pgc"
|
||||
#line 166 "dyntest.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) error ( );}
|
||||
#line 164 "dyntest.pgc"
|
||||
#line 166 "dyntest.pgc"
|
||||
|
||||
printf ("%s\n", BOOLVAR ? "true" : "false");
|
||||
break;
|
||||
@ -407,10 +414,10 @@ if (sqlca.sqlcode < 0) error ( );}
|
||||
{ ECPGget_desc(__LINE__, "MYDESC", INDEX,ECPGd_data,
|
||||
ECPGt_int,&(INTVAR),(long)1,(long)1,sizeof(int), ECPGd_EODT);
|
||||
|
||||
#line 169 "dyntest.pgc"
|
||||
#line 171 "dyntest.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) error ( );}
|
||||
#line 169 "dyntest.pgc"
|
||||
#line 171 "dyntest.pgc"
|
||||
|
||||
printf ("%d\n", INTVAR);
|
||||
break;
|
||||
@ -418,10 +425,10 @@ if (sqlca.sqlcode < 0) error ( );}
|
||||
{ ECPGget_desc(__LINE__, "MYDESC", INDEX,ECPGd_data,
|
||||
ECPGt_double,&(DOUBLEVAR),(long)1,(long)1,sizeof(double), ECPGd_EODT);
|
||||
|
||||
#line 173 "dyntest.pgc"
|
||||
#line 175 "dyntest.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) error ( );}
|
||||
#line 173 "dyntest.pgc"
|
||||
#line 175 "dyntest.pgc"
|
||||
|
||||
printf ("%.*f\n", PRECISION, DOUBLEVAR);
|
||||
break;
|
||||
@ -430,10 +437,10 @@ if (sqlca.sqlcode < 0) error ( );}
|
||||
ECPGt_char,(STRINGVAR),(long)1024,(long)1,(1024)*sizeof(char), ECPGd_di_code,
|
||||
ECPGt_int,&(DATETIME_INTERVAL_CODE),(long)1,(long)1,sizeof(int), ECPGd_EODT);
|
||||
|
||||
#line 179 "dyntest.pgc"
|
||||
#line 181 "dyntest.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) error ( );}
|
||||
#line 179 "dyntest.pgc"
|
||||
#line 181 "dyntest.pgc"
|
||||
|
||||
printf ("%d \"%s\"\n", DATETIME_INTERVAL_CODE, STRINGVAR);
|
||||
break;
|
||||
@ -442,10 +449,10 @@ if (sqlca.sqlcode < 0) error ( );}
|
||||
{ ECPGget_desc(__LINE__, "MYDESC", INDEX,ECPGd_data,
|
||||
ECPGt_char,(STRINGVAR),(long)1024,(long)1,(1024)*sizeof(char), ECPGd_EODT);
|
||||
|
||||
#line 184 "dyntest.pgc"
|
||||
#line 186 "dyntest.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) error ( );}
|
||||
#line 184 "dyntest.pgc"
|
||||
#line 186 "dyntest.pgc"
|
||||
|
||||
printf ("\"%s\"\n", STRINGVAR);
|
||||
break;
|
||||
@ -453,10 +460,10 @@ if (sqlca.sqlcode < 0) error ( );}
|
||||
{ ECPGget_desc(__LINE__, "MYDESC", INDEX,ECPGd_data,
|
||||
ECPGt_char,(STRINGVAR),(long)1024,(long)1,(1024)*sizeof(char), ECPGd_EODT);
|
||||
|
||||
#line 188 "dyntest.pgc"
|
||||
#line 190 "dyntest.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) error ( );}
|
||||
#line 188 "dyntest.pgc"
|
||||
#line 190 "dyntest.pgc"
|
||||
|
||||
printf ("<\"%s\">\n", STRINGVAR);
|
||||
break;
|
||||
@ -465,17 +472,17 @@ if (sqlca.sqlcode < 0) error ( );}
|
||||
}
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, "close MYCURS", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 195 "dyntest.pgc"
|
||||
#line 197 "dyntest.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) error ( );}
|
||||
#line 195 "dyntest.pgc"
|
||||
#line 197 "dyntest.pgc"
|
||||
|
||||
|
||||
ECPGdeallocate_desc(__LINE__, "MYDESC");
|
||||
#line 197 "dyntest.pgc"
|
||||
#line 199 "dyntest.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) error ( );
|
||||
#line 197 "dyntest.pgc"
|
||||
#line 199 "dyntest.pgc"
|
||||
|
||||
|
||||
return 0;
|
||||
|
@ -2,27 +2,31 @@
|
||||
[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 49: 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 49: QUERY: set datestyle to german on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 49 Ok: CREATE TABLE
|
||||
[NO_PID]: ECPGexecute line 49 Ok: SET
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 52: 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 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 52 Ok: INSERT 0 1
|
||||
[NO_PID]: ECPGexecute line 51 Ok: CREATE TABLE
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 53: 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 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 53 Ok: INSERT 0 1
|
||||
[NO_PID]: ECPGexecute line 54 Ok: INSERT 0 1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGprepare line 55: QUERY: select * from dyntest
|
||||
[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 58: QUERY: declare MYCURS cursor for select * from dyntest on connection regress1
|
||||
[NO_PID]: ECPGexecute line 55 Ok: INSERT 0 1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 58 Ok: DECLARE CURSOR
|
||||
[NO_PID]: ECPGprepare line 57: QUERY: select * from dyntest
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 62: QUERY: fetch in MYCURS on connection regress1
|
||||
[NO_PID]: ECPGexecute line 60: QUERY: declare MYCURS cursor for select * from dyntest on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 62: Correctly got 1 tuples with 7 fields
|
||||
[NO_PID]: ECPGexecute line 60 Ok: DECLARE CURSOR
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 64: QUERY: fetch in MYCURS on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 64: Correctly got 1 tuples with 7 fields
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute putting result (1 tuples) into descriptor 'MYDESC'
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
@ -48,7 +52,7 @@
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 184: RESULT: first entry offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 186: RESULT: first entry offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 2
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
@ -70,7 +74,7 @@
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 2
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 173: RESULT: 14.7 offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 175: RESULT: 14.7 offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 3
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
@ -92,7 +96,7 @@
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 3
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 169: RESULT: 14 offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 171: RESULT: 14 offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 4
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
@ -114,7 +118,7 @@
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 4
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 188: RESULT: 123045607890 offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 190: RESULT: 123045607890 offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 5
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
@ -136,7 +140,7 @@
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 5
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 164: RESULT: t offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 166: RESULT: t offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 6
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
@ -158,7 +162,7 @@
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 6
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 184: RESULT: The world's most advanced open source database. offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 186: RESULT: The world's most advanced open source database. offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 7
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
@ -186,11 +190,11 @@
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: TYPE = 1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 177: RESULT: 07-14-1987 offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 179: RESULT: 14.07.1987 offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 62: QUERY: fetch in MYCURS on connection regress1
|
||||
[NO_PID]: ECPGexecute line 64: QUERY: fetch in MYCURS on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 62: Correctly got 1 tuples with 7 fields
|
||||
[NO_PID]: ECPGexecute line 64: Correctly got 1 tuples with 7 fields
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute putting result (1 tuples) into descriptor 'MYDESC'
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
@ -216,7 +220,7 @@
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 184: RESULT: second entry offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 186: RESULT: second entry offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 2
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
@ -238,7 +242,7 @@
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 2
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 173: RESULT: 1407.87 offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 175: RESULT: 1407.87 offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 3
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
@ -260,7 +264,7 @@
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 3
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 169: RESULT: 1407 offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 171: RESULT: 1407 offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 4
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
@ -282,7 +286,7 @@
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 4
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 188: RESULT: 987065403210 offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 190: RESULT: 987065403210 offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 5
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
@ -304,7 +308,7 @@
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 5
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 164: RESULT: f offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 166: RESULT: f offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 6
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
@ -326,7 +330,7 @@
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 6
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 184: RESULT: The elephant never forgets. offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 186: RESULT: The elephant never forgets. offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: reading items for tuple 7
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
@ -354,15 +358,15 @@
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_desc: TYPE = 1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGget_data line 177: RESULT: 11-05-1999 offset: -1 array: Yes
|
||||
[NO_PID]: ECPGget_data line 179: RESULT: 05.11.1999 offset: -1 array: Yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 62: QUERY: fetch in MYCURS on connection regress1
|
||||
[NO_PID]: ECPGexecute line 64: QUERY: fetch in MYCURS on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 62: Correctly got 0 tuples with 7 fields
|
||||
[NO_PID]: ECPGexecute line 64: Correctly got 0 tuples with 7 fields
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: raising sqlcode 100 in line 62, 'No data found in line 62.'.
|
||||
[NO_PID]: raising sqlcode 100 in line 64, 'No data found in line 64.'.
|
||||
[NO_PID]: sqlca: code: 100, state: 02000
|
||||
[NO_PID]: ECPGexecute line 195: QUERY: close MYCURS on connection regress1
|
||||
[NO_PID]: ECPGexecute line 197: QUERY: close MYCURS on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 195 Ok: CLOSE CURSOR
|
||||
[NO_PID]: ECPGexecute line 197 Ok: CLOSE CURSOR
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
|
@ -19,7 +19,7 @@ Found 7 columns
|
||||
= "The world's most advanced open source database."
|
||||
7 day (type: 9 length: -5 precision: -1 scale: 65531 = date)
|
||||
octet_length: 4 returned_octet_length: 10)
|
||||
= 1 "07-14-1987"
|
||||
= 1 "14.07.1987"
|
||||
1 name (type: 1 length: 14 precision: 0 scale: 14 = char(14))
|
||||
octet_length: -1 returned_octet_length: 14)
|
||||
= "second entry "
|
||||
@ -40,4 +40,4 @@ Found 7 columns
|
||||
= "The elephant never forgets."
|
||||
7 day (type: 9 length: -5 precision: -1 scale: 65531 = date)
|
||||
octet_length: 4 returned_octet_length: 10)
|
||||
= 1 "11-05-1999"
|
||||
= 1 "05.11.1999"
|
||||
|
@ -454,10 +454,6 @@ dont_temp_install(){
|
||||
echo "(using postmaster on Unix socket, $port_info)"
|
||||
fi
|
||||
fi
|
||||
|
||||
message "dropping database \"$dbname\""
|
||||
"$bindir/dropdb" $psql_options "$dbname"
|
||||
# errors can be ignored
|
||||
}
|
||||
|
||||
setup_client_environment_variables(){
|
||||
@ -527,6 +523,11 @@ setup_database(){
|
||||
fi
|
||||
}
|
||||
|
||||
drop_database(){
|
||||
message "dropping database \"$1\""
|
||||
"$bindir/dropdb" $psql_options "$1"
|
||||
}
|
||||
|
||||
create_database(){
|
||||
# ----------
|
||||
# We use template0 so that any installation-local cruft in template1
|
||||
|
@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# $PostgreSQL: pgsql/src/interfaces/ecpg/test/pg_regress.sh,v 1.5 2006/08/08 11:51:24 meskes Exp $
|
||||
# $PostgreSQL: pgsql/src/interfaces/ecpg/test/pg_regress.sh,v 1.6 2006/08/19 13:42:40 meskes Exp $
|
||||
|
||||
me=`basename $0`
|
||||
|
||||
@ -33,6 +33,7 @@ trap 'sig_trap $?' 1 2 13 15
|
||||
if [ x"$temp_install" != x"" ]
|
||||
then
|
||||
do_temp_install
|
||||
PGPORT=$temp_port; export PGPORT
|
||||
else # not temp-install
|
||||
dont_temp_install
|
||||
fi
|
||||
@ -45,10 +46,9 @@ fi
|
||||
setup_client_environment_variables
|
||||
|
||||
# set up the dbs we use for ecpg regression tests
|
||||
#"$bindir/createdb" $encoding_opt $psql_options --template template0 regress1
|
||||
#"$bindir/createdb" $encoding_opt $psql_options --template template0 connectdb
|
||||
#database_cleanup
|
||||
create_database $dbname
|
||||
drop_database "$dbname"
|
||||
create_database "$dbname"
|
||||
drop_database connectdb
|
||||
create_database connectdb
|
||||
|
||||
# ----------
|
||||
@ -83,10 +83,9 @@ fi
|
||||
|
||||
# this variable prevents that the PID gets included in the logfiles
|
||||
ECPG_REGRESSION=1; export ECPG_REGRESSION
|
||||
PGPORT=$temp_port; export PGPORT
|
||||
LD_LIBRARY_PATH=$libdir:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
|
||||
|
||||
DIFFFLAGS="$DIFFFLAGS -C3"
|
||||
DIFFPRETTYFLAGS="$DIFFFLAGS -C3"
|
||||
FAILNUM=""
|
||||
|
||||
rm -f regression.diffs
|
||||
@ -136,9 +135,23 @@ for i in \
|
||||
fi
|
||||
|
||||
DIFFER=""
|
||||
diff $DIFFFLAGS expected/$outprg.stderr "$outfile_stderr" >> regression.diffs 2>&1 || DIFFER="$DIFFER, log"
|
||||
diff $DIFFFLAGS expected/$outprg.stdout "$outfile_stdout" >> regression.diffs 2>&1 || DIFFER="$DIFFER, output"
|
||||
diff $DIFFFLAGS expected/$outprg.c "$outputdir"/$outprg.c >> regression.diffs 2>&1 || DIFFER="$DIFFER, source"
|
||||
diff $DIFFFLAGS expected/$outprg.stderr "$outfile_stderr" > /dev/null 2>&1
|
||||
if [ $? != 0 ]; then
|
||||
DIFFER="$DIFFER, log"
|
||||
diff $DIFFPRETTYFLAGS expected/$outprg.stderr "$outfile_stderr" >> regression.diffs 2>&1
|
||||
fi
|
||||
|
||||
diff $DIFFFLAGS expected/$outprg.stdout "$outfile_stdout" > /dev/null 2>&1
|
||||
if [ $? != 0 ]; then
|
||||
DIFFER="$DIFFER, output"
|
||||
diff $DIFFPRETTYFLAGS expected/$outprg.stdout "$outfile_stdout" >> regression.diffs 2>&1
|
||||
fi
|
||||
|
||||
diff $DIFFFLAGS expected/$outprg.c "$outputdir"/$outprg.c > /dev/null 2>&1
|
||||
if [ $? != 0 ]; then
|
||||
DIFFER="$DIFFER, source"
|
||||
diff $DIFFPRETTYFLAGS expected/$outprg.c "$outputdir"/$outprg.c >> regression.diffs 2>&1
|
||||
fi
|
||||
|
||||
DIFFER=`echo $DIFFER | sed -e 's/^, //'`
|
||||
if [ "x$DIFFER" = "x" ]; then
|
||||
@ -150,10 +163,6 @@ for i in \
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "x$FAILNUM" = x"" ]; then
|
||||
rm regression.diffs
|
||||
fi
|
||||
|
||||
postmaster_shutdown
|
||||
|
||||
# FAILNUM is empty if no test has failed
|
||||
|
@ -32,6 +32,8 @@ int main(void)
|
||||
exec sql whenever sqlerror do sqlprint();
|
||||
exec sql connect to REGRESSDB1;
|
||||
|
||||
exec sql set datestyle to mdy;
|
||||
|
||||
exec sql 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);
|
||||
exec sql 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');
|
||||
exec sql 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);
|
||||
|
@ -19,6 +19,8 @@ int main(void)
|
||||
exec sql whenever sqlerror do sqlprint();
|
||||
exec sql connect to REGRESSDB1;
|
||||
|
||||
exec sql set datestyle to postgres;
|
||||
|
||||
exec sql create table test (a int, b text);
|
||||
exec sql insert into test values (1, 'one');
|
||||
exec sql insert into test values (2, 'two');
|
||||
|
@ -46,6 +46,8 @@ main (int argc, char **argv)
|
||||
|
||||
exec sql connect to REGRESSDB1;
|
||||
|
||||
exec sql set datestyle to german;
|
||||
|
||||
exec sql create table dyntest (name char (14), d float8, i int,
|
||||
bignumber int8, b boolean, comment text,
|
||||
day date);
|
||||
|
Loading…
x
Reference in New Issue
Block a user