diff --git a/src/interfaces/ecpg/test/expected/sql-sqlda.c b/src/interfaces/ecpg/test/expected/sql-sqlda.c index b470b04a6a..d6275d74b6 100644 --- a/src/interfaces/ecpg/test/expected/sql-sqlda.c +++ b/src/interfaces/ecpg/test/expected/sql-sqlda.c @@ -149,6 +149,14 @@ dump_sqlda(sqlda_t *sqlda) case ECPGt_int: printf("name sqlda descriptor: '%s' value %d\n", sqlda->sqlvar[i].sqlname.data, *(int *)sqlda->sqlvar[i].sqldata); break; + case ECPGt_long: + printf("name sqlda descriptor: '%s' value %ld\n", sqlda->sqlvar[i].sqlname.data, *(long int *)sqlda->sqlvar[i].sqldata); + break; +#ifdef HAVE_LONG_LONG_INT + case ECPGt_long_long: + printf("name sqlda descriptor: '%s' value %lld\n", sqlda->sqlvar[i].sqlname.data, *(long long int *)sqlda->sqlvar[i].sqldata); + break; +#endif case ECPGt_double: printf("name sqlda descriptor: '%s' value %lf\n", sqlda->sqlvar[i].sqlname.data, *(double *)sqlda->sqlvar[i].sqldata); break; @@ -174,19 +182,19 @@ main (void) -#line 59 "sqlda.pgc" +#line 67 "sqlda.pgc" char * stmt1 = "SELECT * FROM t1" ; -#line 60 "sqlda.pgc" +#line 68 "sqlda.pgc" char * stmt2 = "SELECT * FROM t1 WHERE id = ?" ; -#line 61 "sqlda.pgc" +#line 69 "sqlda.pgc" int rec ; -#line 62 "sqlda.pgc" +#line 70 "sqlda.pgc" int id ; /* exec sql end declare section */ -#line 63 "sqlda.pgc" +#line 71 "sqlda.pgc" char msg[128]; @@ -195,42 +203,42 @@ main (void) strcpy(msg, "connect"); { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , "regress1", 0); -#line 70 "sqlda.pgc" +#line 78 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 70 "sqlda.pgc" +#line 78 "sqlda.pgc" strcpy(msg, "set"); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set datestyle to iso", ECPGt_EOIT, ECPGt_EORT); -#line 73 "sqlda.pgc" +#line 81 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 73 "sqlda.pgc" +#line 81 "sqlda.pgc" strcpy(msg, "create"); - { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table t1 ( id integer , t text , d1 numeric , d2 float8 , c char ( 10 ) )", ECPGt_EOIT, ECPGt_EORT); -#line 81 "sqlda.pgc" + { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table t1 ( id integer , t text , d1 numeric , d2 float8 , c char ( 10 ) , big bigint )", ECPGt_EOIT, ECPGt_EORT); +#line 91 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 81 "sqlda.pgc" +#line 91 "sqlda.pgc" strcpy(msg, "insert"); - { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into t1 values ( 1 , 'a' , 1.0 , 1 , 'a' ) , ( 2 , null , null , null , null ) , ( 4 , 'd' , 4.0 , 4 , 'd' )", ECPGt_EOIT, ECPGt_EORT); -#line 87 "sqlda.pgc" + { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into t1 values ( 1 , 'a' , 1.0 , 1 , 'a' , 1111111111111111111 ) , ( 2 , null , null , null , null , null ) , ( 4 , 'd' , 4.0 , 4 , 'd' , 4444444444444444444 )", ECPGt_EOIT, ECPGt_EORT); +#line 97 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 87 "sqlda.pgc" +#line 97 "sqlda.pgc" strcpy(msg, "commit"); { ECPGtrans(__LINE__, NULL, "commit"); -#line 90 "sqlda.pgc" +#line 100 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 90 "sqlda.pgc" +#line 100 "sqlda.pgc" /* SQLDA test for getting all records from a table */ @@ -239,29 +247,29 @@ if (sqlca.sqlcode < 0) exit (1);} strcpy(msg, "prepare"); { ECPGprepare(__LINE__, NULL, 0, "st_id1", stmt1); -#line 97 "sqlda.pgc" +#line 107 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 97 "sqlda.pgc" +#line 107 "sqlda.pgc" strcpy(msg, "declare"); /* declare mycur1 cursor for $1 */ -#line 100 "sqlda.pgc" +#line 110 "sqlda.pgc" strcpy(msg, "open"); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare mycur1 cursor for $1", ECPGt_char_variable,(ECPGprepared_statement(NULL, "st_id1", __LINE__)),(long)1,(long)1,(1)*sizeof(char), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT); -#line 103 "sqlda.pgc" +#line 113 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 103 "sqlda.pgc" +#line 113 "sqlda.pgc" /* exec sql whenever not found break ; */ -#line 105 "sqlda.pgc" +#line 115 "sqlda.pgc" rec = 0; @@ -271,13 +279,13 @@ if (sqlca.sqlcode < 0) exit (1);} { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch 1 from mycur1", ECPGt_EOIT, ECPGt_sqlda, &outp_sqlda, 0L, 0L, 0L, ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT); -#line 111 "sqlda.pgc" +#line 121 "sqlda.pgc" if (sqlca.sqlcode == ECPG_NOT_FOUND) break; -#line 111 "sqlda.pgc" +#line 121 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 111 "sqlda.pgc" +#line 121 "sqlda.pgc" printf("FETCH RECORD %d\n", ++rec); @@ -285,23 +293,23 @@ if (sqlca.sqlcode < 0) exit (1);} } /* exec sql whenever not found continue ; */ -#line 117 "sqlda.pgc" +#line 127 "sqlda.pgc" strcpy(msg, "close"); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close mycur1", ECPGt_EOIT, ECPGt_EORT); -#line 120 "sqlda.pgc" +#line 130 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 120 "sqlda.pgc" +#line 130 "sqlda.pgc" strcpy(msg, "deallocate"); { ECPGdeallocate(__LINE__, 0, NULL, "st_id1"); -#line 123 "sqlda.pgc" +#line 133 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 123 "sqlda.pgc" +#line 133 "sqlda.pgc" free(outp_sqlda); @@ -312,35 +320,35 @@ if (sqlca.sqlcode < 0) exit (1);} strcpy(msg, "prepare"); { ECPGprepare(__LINE__, NULL, 0, "st_id2", stmt1); -#line 132 "sqlda.pgc" +#line 142 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 132 "sqlda.pgc" +#line 142 "sqlda.pgc" strcpy(msg, "declare"); /* declare mycur2 cursor for $1 */ -#line 135 "sqlda.pgc" +#line 145 "sqlda.pgc" strcpy(msg, "open"); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare mycur2 cursor for $1", ECPGt_char_variable,(ECPGprepared_statement(NULL, "st_id2", __LINE__)),(long)1,(long)1,(1)*sizeof(char), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT); -#line 138 "sqlda.pgc" +#line 148 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 138 "sqlda.pgc" +#line 148 "sqlda.pgc" strcpy(msg, "fetch"); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch all from mycur2", ECPGt_EOIT, ECPGt_sqlda, &outp_sqlda, 0L, 0L, 0L, ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT); -#line 141 "sqlda.pgc" +#line 151 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 141 "sqlda.pgc" +#line 151 "sqlda.pgc" outp_sqlda1 = outp_sqlda; @@ -358,18 +366,18 @@ if (sqlca.sqlcode < 0) exit (1);} strcpy(msg, "close"); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close mycur2", ECPGt_EOIT, ECPGt_EORT); -#line 157 "sqlda.pgc" +#line 167 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 157 "sqlda.pgc" +#line 167 "sqlda.pgc" strcpy(msg, "deallocate"); { ECPGdeallocate(__LINE__, 0, NULL, "st_id2"); -#line 160 "sqlda.pgc" +#line 170 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 160 "sqlda.pgc" +#line 170 "sqlda.pgc" /* SQLDA test for getting one record using an input descriptor */ @@ -393,10 +401,10 @@ if (sqlca.sqlcode < 0) exit (1);} strcpy(msg, "prepare"); { ECPGprepare(__LINE__, NULL, 0, "st_id3", stmt2); -#line 182 "sqlda.pgc" +#line 192 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 182 "sqlda.pgc" +#line 192 "sqlda.pgc" strcpy(msg, "execute"); @@ -405,20 +413,20 @@ if (sqlca.sqlcode < 0) exit (1);} ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_sqlda, &outp_sqlda, 0L, 0L, 0L, ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT); -#line 185 "sqlda.pgc" +#line 195 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 185 "sqlda.pgc" +#line 195 "sqlda.pgc" dump_sqlda(outp_sqlda); strcpy(msg, "deallocate"); { ECPGdeallocate(__LINE__, 0, NULL, "st_id3"); -#line 190 "sqlda.pgc" +#line 200 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 190 "sqlda.pgc" +#line 200 "sqlda.pgc" free(inp_sqlda); @@ -429,10 +437,10 @@ if (sqlca.sqlcode < 0) exit (1);} */ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , "con2", 0); -#line 199 "sqlda.pgc" +#line 209 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 199 "sqlda.pgc" +#line 209 "sqlda.pgc" /* @@ -454,10 +462,10 @@ if (sqlca.sqlcode < 0) exit (1);} strcpy(msg, "prepare"); { ECPGprepare(__LINE__, "con2", 0, "st_id4", stmt2); -#line 219 "sqlda.pgc" +#line 229 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 219 "sqlda.pgc" +#line 229 "sqlda.pgc" strcpy(msg, "execute"); @@ -466,28 +474,28 @@ if (sqlca.sqlcode < 0) exit (1);} ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_sqlda, &outp_sqlda, 0L, 0L, 0L, ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT); -#line 222 "sqlda.pgc" +#line 232 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 222 "sqlda.pgc" +#line 232 "sqlda.pgc" dump_sqlda(outp_sqlda); strcpy(msg, "commit"); { ECPGtrans(__LINE__, "con2", "commit"); -#line 227 "sqlda.pgc" +#line 237 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 227 "sqlda.pgc" +#line 237 "sqlda.pgc" strcpy(msg, "deallocate"); { ECPGdeallocate(__LINE__, 0, NULL, "st_id4"); -#line 230 "sqlda.pgc" +#line 240 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 230 "sqlda.pgc" +#line 240 "sqlda.pgc" free(inp_sqlda); @@ -495,36 +503,36 @@ if (sqlca.sqlcode < 0) exit (1);} strcpy(msg, "disconnect"); { ECPGdisconnect(__LINE__, "con2"); -#line 236 "sqlda.pgc" +#line 246 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 236 "sqlda.pgc" +#line 246 "sqlda.pgc" /* End test */ strcpy(msg, "drop"); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table t1", ECPGt_EOIT, ECPGt_EORT); -#line 241 "sqlda.pgc" +#line 251 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 241 "sqlda.pgc" +#line 251 "sqlda.pgc" strcpy(msg, "commit"); { ECPGtrans(__LINE__, NULL, "commit"); -#line 244 "sqlda.pgc" +#line 254 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 244 "sqlda.pgc" +#line 254 "sqlda.pgc" strcpy(msg, "disconnect"); { ECPGdisconnect(__LINE__, "CURRENT"); -#line 247 "sqlda.pgc" +#line 257 "sqlda.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 247 "sqlda.pgc" +#line 257 "sqlda.pgc" return (0); diff --git a/src/interfaces/ecpg/test/expected/sql-sqlda.stderr b/src/interfaces/ecpg/test/expected/sql-sqlda.stderr index fdddf9ea31..8c70100bde 100644 --- a/src/interfaces/ecpg/test/expected/sql-sqlda.stderr +++ b/src/interfaces/ecpg/test/expected/sql-sqlda.stderr @@ -2,307 +2,335 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database ecpg1_regression on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 73: query: set datestyle to iso; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 81: query: set datestyle to iso; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 73: using PQexec +[NO_PID]: ecpg_execute on line 81: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 73: OK: SET +[NO_PID]: ecpg_process_output on line 81: OK: SET [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 76: query: create table t1 ( id integer , t text , d1 numeric , d2 float8 , c char ( 10 ) ); with 0 parameter(s) on connection regress1 -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 76: using PQexec -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 76: OK: CREATE TABLE -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 84: query: insert into t1 values ( 1 , 'a' , 1.0 , 1 , 'a' ) , ( 2 , null , null , null , null ) , ( 4 , 'd' , 4.0 , 4 , 'd' ); with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 84: query: create table t1 ( id integer , t text , d1 numeric , d2 float8 , c char ( 10 ) , big bigint ); with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 84: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 84: OK: INSERT 0 3 +[NO_PID]: ecpg_process_output on line 84: OK: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGtrans on line 90: action "commit"; connection "regress1" +[NO_PID]: ecpg_execute on line 94: query: insert into t1 values ( 1 , 'a' , 1.0 , 1 , 'a' , 1111111111111111111 ) , ( 2 , null , null , null , null , null ) , ( 4 , 'd' , 4.0 , 4 , 'd' , 4444444444444444444 ); with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: prepare_common on line 97: name st_id1; query: "SELECT * FROM t1" +[NO_PID]: ecpg_execute on line 94: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 103: query: declare mycur1 cursor for SELECT * FROM t1; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_process_output on line 94: OK: INSERT 0 3 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 103: using PQexec +[NO_PID]: ECPGtrans on line 100: action "commit"; connection "regress1" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 103: OK: DECLARE CURSOR +[NO_PID]: prepare_common on line 107: name st_id1; query: "SELECT * FROM t1" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 111: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 113: query: declare mycur1 cursor for SELECT * FROM t1; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 111: using PQexec +[NO_PID]: ecpg_execute on line 113: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 111: correctly got 1 tuples with 5 fields +[NO_PID]: ecpg_process_output on line 113: OK: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_build_native_sqlda on line 111 sqld = 5 +[NO_PID]: ecpg_execute on line 121: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 111: new sqlda was built +[NO_PID]: ecpg_execute on line 121: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 0 IS NOT NULL +[NO_PID]: ecpg_process_output on line 121: correctly got 1 tuples with 6 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 111: RESULT: 1 offset: -1; array: no +[NO_PID]: ecpg_build_native_sqlda on line 121 sqld = 6 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 1 IS NOT NULL +[NO_PID]: ecpg_process_output on line 121: new sqlda was built [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 111: RESULT: a offset: -1; array: no +[NO_PID]: ecpg_set_native_sqlda on line 121 row 0 col 0 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 2 IS NOT NULL +[NO_PID]: ecpg_get_data on line 121: RESULT: 1 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 3 IS NOT NULL +[NO_PID]: ecpg_set_native_sqlda on line 121 row 0 col 1 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 111: RESULT: 1 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 121: RESULT: a offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 4 IS NOT NULL +[NO_PID]: ecpg_set_native_sqlda on line 121 row 0 col 2 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 111: RESULT: a offset: -1; array: no +[NO_PID]: ecpg_set_native_sqlda on line 121 row 0 col 3 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 111: putting result (1 tuple 5 fields) into sqlda descriptor +[NO_PID]: ecpg_get_data on line 121: RESULT: 1 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 111: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_set_native_sqlda on line 121 row 0 col 4 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 111: using PQexec +[NO_PID]: ecpg_get_data on line 121: RESULT: a offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 111: correctly got 1 tuples with 5 fields +[NO_PID]: ecpg_set_native_sqlda on line 121 row 0 col 5 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_build_native_sqlda on line 111 sqld = 5 +[NO_PID]: ecpg_get_data on line 121: RESULT: 1111111111111111111 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 111: new sqlda was built +[NO_PID]: ecpg_process_output on line 121: putting result (1 tuple 6 fields) into sqlda descriptor [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 0 IS NOT NULL +[NO_PID]: ecpg_execute on line 121: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 111: RESULT: 2 offset: -1; array: no +[NO_PID]: ecpg_execute on line 121: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 1 IS NULL +[NO_PID]: ecpg_process_output on line 121: correctly got 1 tuples with 6 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 2 IS NULL +[NO_PID]: ecpg_build_native_sqlda on line 121 sqld = 6 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 3 IS NULL +[NO_PID]: ecpg_process_output on line 121: new sqlda was built [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 4 IS NULL +[NO_PID]: ecpg_set_native_sqlda on line 121 row 0 col 0 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 111: putting result (1 tuple 5 fields) into sqlda descriptor +[NO_PID]: ecpg_get_data on line 121: RESULT: 2 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 111: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_set_native_sqlda on line 121 row 0 col 1 IS NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 111: using PQexec +[NO_PID]: ecpg_set_native_sqlda on line 121 row 0 col 2 IS NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 111: correctly got 1 tuples with 5 fields +[NO_PID]: ecpg_set_native_sqlda on line 121 row 0 col 3 IS NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_build_native_sqlda on line 111 sqld = 5 +[NO_PID]: ecpg_set_native_sqlda on line 121 row 0 col 4 IS NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 111: new sqlda was built +[NO_PID]: ecpg_set_native_sqlda on line 121 row 0 col 5 IS NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 0 IS NOT NULL +[NO_PID]: ecpg_process_output on line 121: putting result (1 tuple 6 fields) into sqlda descriptor [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 111: RESULT: 4 offset: -1; array: no +[NO_PID]: ecpg_execute on line 121: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 1 IS NOT NULL +[NO_PID]: ecpg_execute on line 121: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 111: RESULT: d offset: -1; array: no +[NO_PID]: ecpg_process_output on line 121: correctly got 1 tuples with 6 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 2 IS NOT NULL +[NO_PID]: ecpg_build_native_sqlda on line 121 sqld = 6 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 3 IS NOT NULL +[NO_PID]: ecpg_process_output on line 121: new sqlda was built [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 111: RESULT: 4 offset: -1; array: no +[NO_PID]: ecpg_set_native_sqlda on line 121 row 0 col 0 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 4 IS NOT NULL +[NO_PID]: ecpg_get_data on line 121: RESULT: 4 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 111: RESULT: d offset: -1; array: no +[NO_PID]: ecpg_set_native_sqlda on line 121 row 0 col 1 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 111: putting result (1 tuple 5 fields) into sqlda descriptor +[NO_PID]: ecpg_get_data on line 121: RESULT: d offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 111: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_set_native_sqlda on line 121 row 0 col 2 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 111: using PQexec +[NO_PID]: ecpg_set_native_sqlda on line 121 row 0 col 3 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 111: correctly got 0 tuples with 5 fields +[NO_PID]: ecpg_get_data on line 121: RESULT: 4 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: raising sqlcode 100 on line 111: no data found on line 111 +[NO_PID]: ecpg_set_native_sqlda on line 121 row 0 col 4 IS NOT NULL +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_get_data on line 121: RESULT: d offset: -1; array: no +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_set_native_sqlda on line 121 row 0 col 5 IS NOT NULL +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_get_data on line 121: RESULT: 4444444444444444444 offset: -1; array: no +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_process_output on line 121: putting result (1 tuple 6 fields) into sqlda descriptor +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_execute on line 121: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_execute on line 121: using PQexec +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_process_output on line 121: correctly got 0 tuples with 6 fields +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: raising sqlcode 100 on line 121: no data found on line 121 [NO_PID]: sqlca: code: 100, state: 02000 -[NO_PID]: ecpg_execute on line 120: query: close mycur1; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 130: query: close mycur1; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 120: using PQexec +[NO_PID]: ecpg_execute on line 130: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 120: OK: CLOSE CURSOR +[NO_PID]: ecpg_process_output on line 130: OK: CLOSE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: deallocate_one on line 123: name st_id1 +[NO_PID]: deallocate_one on line 133: name st_id1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: prepare_common on line 132: name st_id2; query: "SELECT * FROM t1" +[NO_PID]: prepare_common on line 142: name st_id2; query: "SELECT * FROM t1" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 138: query: declare mycur2 cursor for SELECT * FROM t1; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 148: query: declare mycur2 cursor for SELECT * FROM t1; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 138: using PQexec +[NO_PID]: ecpg_execute on line 148: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 138: OK: DECLARE CURSOR +[NO_PID]: ecpg_process_output on line 148: OK: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 141: query: fetch all from mycur2; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 151: query: fetch all from mycur2; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 141: using PQexec +[NO_PID]: ecpg_execute on line 151: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 141: correctly got 3 tuples with 5 fields +[NO_PID]: ecpg_process_output on line 151: correctly got 3 tuples with 6 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_build_native_sqlda on line 141 sqld = 5 +[NO_PID]: ecpg_build_native_sqlda on line 151 sqld = 6 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 141: new sqlda was built +[NO_PID]: ecpg_process_output on line 151: new sqlda was built [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 141 row 2 col 0 IS NOT NULL +[NO_PID]: ecpg_set_native_sqlda on line 151 row 2 col 0 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 141: RESULT: 4 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 151: RESULT: 4 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 141 row 2 col 1 IS NOT NULL +[NO_PID]: ecpg_set_native_sqlda on line 151 row 2 col 1 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 141: RESULT: d offset: -1; array: no +[NO_PID]: ecpg_get_data on line 151: RESULT: d offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 141 row 2 col 2 IS NOT NULL +[NO_PID]: ecpg_set_native_sqlda on line 151 row 2 col 2 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 141 row 2 col 3 IS NOT NULL +[NO_PID]: ecpg_set_native_sqlda on line 151 row 2 col 3 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 141: RESULT: 4 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 151: RESULT: 4 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 141 row 2 col 4 IS NOT NULL +[NO_PID]: ecpg_set_native_sqlda on line 151 row 2 col 4 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 141: RESULT: d offset: -1; array: no +[NO_PID]: ecpg_get_data on line 151: RESULT: d offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 141: putting result (1 tuple 5 fields) into sqlda descriptor +[NO_PID]: ecpg_set_native_sqlda on line 151 row 2 col 5 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_build_native_sqlda on line 141 sqld = 5 +[NO_PID]: ecpg_get_data on line 151: RESULT: 4444444444444444444 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 141: new sqlda was built +[NO_PID]: ecpg_process_output on line 151: putting result (1 tuple 6 fields) into sqlda descriptor [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 141 row 1 col 0 IS NOT NULL +[NO_PID]: ecpg_build_native_sqlda on line 151 sqld = 6 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 141: RESULT: 2 offset: -1; array: no +[NO_PID]: ecpg_process_output on line 151: new sqlda was built [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 141 row 1 col 1 IS NULL +[NO_PID]: ecpg_set_native_sqlda on line 151 row 1 col 0 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 141 row 1 col 2 IS NULL +[NO_PID]: ecpg_get_data on line 151: RESULT: 2 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 141 row 1 col 3 IS NULL +[NO_PID]: ecpg_set_native_sqlda on line 151 row 1 col 1 IS NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 141 row 1 col 4 IS NULL +[NO_PID]: ecpg_set_native_sqlda on line 151 row 1 col 2 IS NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 141: putting result (1 tuple 5 fields) into sqlda descriptor +[NO_PID]: ecpg_set_native_sqlda on line 151 row 1 col 3 IS NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_build_native_sqlda on line 141 sqld = 5 +[NO_PID]: ecpg_set_native_sqlda on line 151 row 1 col 4 IS NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 141: new sqlda was built +[NO_PID]: ecpg_set_native_sqlda on line 151 row 1 col 5 IS NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 0 IS NOT NULL +[NO_PID]: ecpg_process_output on line 151: putting result (1 tuple 6 fields) into sqlda descriptor [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 141: RESULT: 1 offset: -1; array: no +[NO_PID]: ecpg_build_native_sqlda on line 151 sqld = 6 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 1 IS NOT NULL +[NO_PID]: ecpg_process_output on line 151: new sqlda was built [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 141: RESULT: a offset: -1; array: no +[NO_PID]: ecpg_set_native_sqlda on line 151 row 0 col 0 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 2 IS NOT NULL +[NO_PID]: ecpg_get_data on line 151: RESULT: 1 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 3 IS NOT NULL +[NO_PID]: ecpg_set_native_sqlda on line 151 row 0 col 1 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 141: RESULT: 1 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 151: RESULT: a offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 4 IS NOT NULL +[NO_PID]: ecpg_set_native_sqlda on line 151 row 0 col 2 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 141: RESULT: a offset: -1; array: no +[NO_PID]: ecpg_set_native_sqlda on line 151 row 0 col 3 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 141: putting result (1 tuple 5 fields) into sqlda descriptor +[NO_PID]: ecpg_get_data on line 151: RESULT: 1 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 157: query: close mycur2; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_set_native_sqlda on line 151 row 0 col 4 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 157: using PQexec +[NO_PID]: ecpg_get_data on line 151: RESULT: a offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 157: OK: CLOSE CURSOR +[NO_PID]: ecpg_set_native_sqlda on line 151 row 0 col 5 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: deallocate_one on line 160: name st_id2 +[NO_PID]: ecpg_get_data on line 151: RESULT: 1111111111111111111 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: prepare_common on line 182: name st_id3; query: "SELECT * FROM t1 WHERE id = $1" +[NO_PID]: ecpg_process_output on line 151: putting result (1 tuple 6 fields) into sqlda descriptor [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 185: query: SELECT * FROM t1 WHERE id = $1; with 1 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 167: query: close mycur2; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 185: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1" +[NO_PID]: ecpg_execute on line 167: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 185: parameter 1 = 4 +[NO_PID]: ecpg_process_output on line 167: OK: CLOSE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 185: correctly got 1 tuples with 5 fields +[NO_PID]: deallocate_one on line 170: name st_id2 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_build_native_sqlda on line 185 sqld = 5 +[NO_PID]: prepare_common on line 192: name st_id3; query: "SELECT * FROM t1 WHERE id = $1" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 185: new sqlda was built +[NO_PID]: ecpg_execute on line 195: query: SELECT * FROM t1 WHERE id = $1; with 1 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 185 row 0 col 0 IS NOT NULL +[NO_PID]: ecpg_execute on line 195: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 185: RESULT: 4 offset: -1; array: no +[NO_PID]: ecpg_free_params on line 195: parameter 1 = 4 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 185 row 0 col 1 IS NOT NULL +[NO_PID]: ecpg_process_output on line 195: correctly got 1 tuples with 6 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 185: RESULT: d offset: -1; array: no +[NO_PID]: ecpg_build_native_sqlda on line 195 sqld = 6 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 185 row 0 col 2 IS NOT NULL +[NO_PID]: ecpg_process_output on line 195: new sqlda was built [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 185 row 0 col 3 IS NOT NULL +[NO_PID]: ecpg_set_native_sqlda on line 195 row 0 col 0 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 185: RESULT: 4 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 195: RESULT: 4 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 185 row 0 col 4 IS NOT NULL +[NO_PID]: ecpg_set_native_sqlda on line 195 row 0 col 1 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 185: RESULT: d offset: -1; array: no +[NO_PID]: ecpg_get_data on line 195: RESULT: d offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 185: putting result (1 tuple 5 fields) into sqlda descriptor +[NO_PID]: ecpg_set_native_sqlda on line 195 row 0 col 2 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: deallocate_one on line 190: name st_id3 +[NO_PID]: ecpg_set_native_sqlda on line 195 row 0 col 3 IS NOT NULL +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_get_data on line 195: RESULT: 4 offset: -1; array: no +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_set_native_sqlda on line 195 row 0 col 4 IS NOT NULL +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_get_data on line 195: RESULT: d offset: -1; array: no +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_set_native_sqlda on line 195 row 0 col 5 IS NOT NULL +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_get_data on line 195: RESULT: 4444444444444444444 offset: -1; array: no +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_process_output on line 195: putting result (1 tuple 6 fields) into sqlda descriptor +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: deallocate_one on line 200: name st_id3 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database ecpg1_regression on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: prepare_common on line 219: name st_id4; query: "SELECT * FROM t1 WHERE id = $1" +[NO_PID]: prepare_common on line 229: name st_id4; query: "SELECT * FROM t1 WHERE id = $1" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 222: query: SELECT * FROM t1 WHERE id = $1; with 1 parameter(s) on connection con2 +[NO_PID]: ecpg_execute on line 232: query: SELECT * FROM t1 WHERE id = $1; with 1 parameter(s) on connection con2 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 222: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1" +[NO_PID]: ecpg_execute on line 232: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 222: parameter 1 = 4 +[NO_PID]: ecpg_free_params on line 232: parameter 1 = 4 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 222: correctly got 1 tuples with 5 fields +[NO_PID]: ecpg_process_output on line 232: correctly got 1 tuples with 6 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_build_native_sqlda on line 222 sqld = 5 +[NO_PID]: ecpg_build_native_sqlda on line 232 sqld = 6 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 222: new sqlda was built +[NO_PID]: ecpg_process_output on line 232: new sqlda was built [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 222 row 0 col 0 IS NOT NULL +[NO_PID]: ecpg_set_native_sqlda on line 232 row 0 col 0 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 222: RESULT: 4 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 232: RESULT: 4 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 222 row 0 col 1 IS NOT NULL +[NO_PID]: ecpg_set_native_sqlda on line 232 row 0 col 1 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 222: RESULT: d offset: -1; array: no +[NO_PID]: ecpg_get_data on line 232: RESULT: d offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 222 row 0 col 2 IS NOT NULL +[NO_PID]: ecpg_set_native_sqlda on line 232 row 0 col 2 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 222 row 0 col 3 IS NOT NULL +[NO_PID]: ecpg_set_native_sqlda on line 232 row 0 col 3 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 222: RESULT: 4 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 232: RESULT: 4 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_set_native_sqlda on line 222 row 0 col 4 IS NOT NULL +[NO_PID]: ecpg_set_native_sqlda on line 232 row 0 col 4 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 222: RESULT: d offset: -1; array: no +[NO_PID]: ecpg_get_data on line 232: RESULT: d offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 222: putting result (1 tuple 5 fields) into sqlda descriptor +[NO_PID]: ecpg_set_native_sqlda on line 232 row 0 col 5 IS NOT NULL [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGtrans on line 227: action "commit"; connection "con2" +[NO_PID]: ecpg_get_data on line 232: RESULT: 4444444444444444444 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: deallocate_one on line 230: name st_id4 +[NO_PID]: ecpg_process_output on line 232: putting result (1 tuple 6 fields) into sqlda descriptor +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGtrans on line 237: action "commit"; connection "con2" +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: deallocate_one on line 240: name st_id4 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: connection con2 closed [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 241: query: drop table t1; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 251: query: drop table t1; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 241: using PQexec +[NO_PID]: ecpg_execute on line 251: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 241: OK: DROP TABLE +[NO_PID]: ecpg_process_output on line 251: OK: DROP TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGtrans on line 244: action "commit"; connection "regress1" +[NO_PID]: ECPGtrans on line 254: 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 diff --git a/src/interfaces/ecpg/test/expected/sql-sqlda.stdout b/src/interfaces/ecpg/test/expected/sql-sqlda.stdout index a59c2e32e2..26390df915 100644 --- a/src/interfaces/ecpg/test/expected/sql-sqlda.stdout +++ b/src/interfaces/ecpg/test/expected/sql-sqlda.stdout @@ -4,45 +4,53 @@ name sqlda descriptor: 't' value 'a' name sqlda descriptor: 'd1' value NUMERIC '1.0' name sqlda descriptor: 'd2' value 1.000000 name sqlda descriptor: 'c' value 'a ' +name sqlda descriptor: 'big' value 1111111111111111111 FETCH RECORD 2 name sqlda descriptor: 'id' value 2 name sqlda descriptor: 't' value NULL' name sqlda descriptor: 'd1' value NULL' name sqlda descriptor: 'd2' value NULL' name sqlda descriptor: 'c' value NULL' +name sqlda descriptor: 'big' value NULL' FETCH RECORD 3 name sqlda descriptor: 'id' value 4 name sqlda descriptor: 't' value 'd' name sqlda descriptor: 'd1' value NUMERIC '4.0' name sqlda descriptor: 'd2' value 4.000000 name sqlda descriptor: 'c' value 'd ' +name sqlda descriptor: 'big' value 4444444444444444444 FETCH RECORD 1 name sqlda descriptor: 'id' value 1 name sqlda descriptor: 't' value 'a' name sqlda descriptor: 'd1' value NUMERIC '1.0' name sqlda descriptor: 'd2' value 1.000000 name sqlda descriptor: 'c' value 'a ' +name sqlda descriptor: 'big' value 1111111111111111111 FETCH RECORD 2 name sqlda descriptor: 'id' value 2 name sqlda descriptor: 't' value NULL' name sqlda descriptor: 'd1' value NULL' name sqlda descriptor: 'd2' value NULL' name sqlda descriptor: 'c' value NULL' +name sqlda descriptor: 'big' value NULL' FETCH RECORD 3 name sqlda descriptor: 'id' value 4 name sqlda descriptor: 't' value 'd' name sqlda descriptor: 'd1' value NUMERIC '4.0' name sqlda descriptor: 'd2' value 4.000000 name sqlda descriptor: 'c' value 'd ' +name sqlda descriptor: 'big' value 4444444444444444444 EXECUTE RECORD 4 name sqlda descriptor: 'id' value 4 name sqlda descriptor: 't' value 'd' name sqlda descriptor: 'd1' value NUMERIC '4.0' name sqlda descriptor: 'd2' value 4.000000 name sqlda descriptor: 'c' value 'd ' +name sqlda descriptor: 'big' value 4444444444444444444 EXECUTE RECORD 4 name sqlda descriptor: 'id' value 4 name sqlda descriptor: 't' value 'd' name sqlda descriptor: 'd1' value NUMERIC '4.0' name sqlda descriptor: 'd2' value 4.000000 name sqlda descriptor: 'c' value 'd ' +name sqlda descriptor: 'big' value 4444444444444444444 diff --git a/src/interfaces/ecpg/test/sql/sqlda.pgc b/src/interfaces/ecpg/test/sql/sqlda.pgc index 29774b5909..f2c839fc08 100644 --- a/src/interfaces/ecpg/test/sql/sqlda.pgc +++ b/src/interfaces/ecpg/test/sql/sqlda.pgc @@ -36,6 +36,14 @@ dump_sqlda(sqlda_t *sqlda) case ECPGt_int: printf("name sqlda descriptor: '%s' value %d\n", sqlda->sqlvar[i].sqlname.data, *(int *)sqlda->sqlvar[i].sqldata); break; + case ECPGt_long: + printf("name sqlda descriptor: '%s' value %ld\n", sqlda->sqlvar[i].sqlname.data, *(long int *)sqlda->sqlvar[i].sqldata); + break; +#ifdef HAVE_LONG_LONG_INT + case ECPGt_long_long: + printf("name sqlda descriptor: '%s' value %lld\n", sqlda->sqlvar[i].sqlname.data, *(long long int *)sqlda->sqlvar[i].sqldata); + break; +#endif case ECPGt_double: printf("name sqlda descriptor: '%s' value %lf\n", sqlda->sqlvar[i].sqlname.data, *(double *)sqlda->sqlvar[i].sqldata); break; @@ -78,13 +86,15 @@ exec sql end declare section; t text, d1 numeric, d2 float8, - c char(10)); + c char(10), + big bigint + ); strcpy(msg, "insert"); exec sql insert into t1 values - (1, 'a', 1.0, 1, 'a'), - (2, null, null, null, null), - (4, 'd', 4.0, 4, 'd'); + (1, 'a', 1.0, 1, 'a',1111111111111111111), + (2, null, null, null, null,null), + (4, 'd', 4.0, 4, 'd',4444444444444444444); strcpy(msg, "commit"); exec sql commit;