Subject: MinGW compiler warnings in ecpg tests

From: Peter Eisentraut <[email-masked]>
Date: Fri, 25 Oct 2019 21:32:45 +0200

Under MinGW, when compiling the ecpg test files, you get these warnings:

sqlda.pgc: In function 'dump_sqlda':
sqlda.pgc:44:11: warning: unknown conversion type character 'l' in format [-Wformat=]
    printf("name sqlda descriptor: '%s' value %lld\n", sqlda->sqlvar[i].sqlname.data, *(long long int *)sqlda->sqlvar[i].sqldata);
sqlda.pgc:44:11: warning: too many arguments for format [-Wformat-extra-args]
sqlda.pgc:44:11: warning: unknown conversion type character 'l' in format [-Wformat=]
sqlda.pgc:44:11: warning: too many arguments for format [-Wformat-extra-args]

These files don't use our printf replacement or the c.h porting layer,
so unless we want to start doing that, I propose the attached patch to
determine the appropriate format conversion the hard way.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From 55247b3bc0e72b50716bb753177be19101fd6c07 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <[email-masked]>
Date: Tue, 17 Sep 2019 11:32:33 +0200
Subject: [PATCH] Fix compiler warning

---
 src/interfaces/ecpg/test/expected/sql-sqlda.c | 136 +++---
 .../ecpg/test/expected/sql-sqlda.stderr       | 450 +++++++++---------
 src/interfaces/ecpg/test/sql/sqlda.pgc        |   8 +-
 3 files changed, 303 insertions(+), 291 deletions(-)

diff --git a/src/interfaces/ecpg/test/expected/sql-sqlda.c b/src/interfaces/ecpg/test/expected/sql-sqlda.c
index 6bd9d5527a..dae047d007 100644
--- a/src/interfaces/ecpg/test/expected/sql-sqlda.c
+++ b/src/interfaces/ecpg/test/expected/sql-sqlda.c
@@ -156,7 +156,13 @@ dump_sqlda(sqlda_t *sqlda)
 			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);
+			printf(
+#ifdef _WIN32
+				"name sqlda descriptor: '%s' value %I64d\n",
+#else
+				"name sqlda descriptor: '%s' value %lld\n",
+#endif
+				sqlda->sqlvar[i].sqlname.data, *(long long int *)sqlda->sqlvar[i].sqldata);
 			break;
 #endif
 		case ECPGt_double:
@@ -184,19 +190,19 @@ main (void)

-#line 67 "sqlda.pgc"
+#line 73 "sqlda.pgc"
  char * stmt1 = "SELECT * FROM t1" ;
  
-#line 68 "sqlda.pgc"
+#line 74 "sqlda.pgc"
  char * stmt2 = "SELECT * FROM t1 WHERE id = ?" ;
  
-#line 69 "sqlda.pgc"
+#line 75 "sqlda.pgc"
  int rec ;
  
-#line 70 "sqlda.pgc"
+#line 76 "sqlda.pgc"
  int id ;
 /* exec sql end declare section */
-#line 71 "sqlda.pgc"
+#line 77 "sqlda.pgc"

 	char msg[128];
@@ -205,42 +211,42 @@ main (void)
 
 	strcpy(msg, "connect");
 	{ ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , "regress1", 0); 
-#line 78 "sqlda.pgc"
+#line 84 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 78 "sqlda.pgc"
+#line 84 "sqlda.pgc"

 	strcpy(msg, "set");
 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set datestyle to iso", ECPGt_EOIT, ECPGt_EORT);
-#line 81 "sqlda.pgc"
+#line 87 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 81 "sqlda.pgc"
+#line 87 "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 ) , big bigint )", ECPGt_EOIT, ECPGt_EORT);
-#line 91 "sqlda.pgc"
+#line 97 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 91 "sqlda.pgc"
+#line 97 "sqlda.pgc"

 	strcpy(msg, "insert");
 	{ 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 ) , ( 3 , 'c' , 0.0 , 3 , 'c' , 3333333333333333333 ) , ( 4 , 'd' , 'NaN' , 4 , 'd' , 4444444444444444444 ) , ( 5 , 'e' , 0.001234 , 5 , 'e' , 5555555555555555555 )", ECPGt_EOIT, ECPGt_EORT);
-#line 99 "sqlda.pgc"
+#line 105 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 99 "sqlda.pgc"
+#line 105 "sqlda.pgc"

 	strcpy(msg, "commit");
 	{ ECPGtrans(__LINE__, NULL, "commit");
-#line 102 "sqlda.pgc"
+#line 108 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 102 "sqlda.pgc"
+#line 108 "sqlda.pgc"

 	/* SQLDA test for getting all records from a table */
@@ -249,29 +255,29 @@ if (sqlca.sqlcode < 0) exit (1);}
 
 	strcpy(msg, "prepare");
 	{ ECPGprepare(__LINE__, NULL, 0, "st_id1", stmt1);
-#line 109 "sqlda.pgc"
+#line 115 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 109 "sqlda.pgc"
+#line 115 "sqlda.pgc"

 	strcpy(msg, "declare");
 	/* declare mycur1 cursor for $1 */
-#line 112 "sqlda.pgc"
+#line 118 "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 115 "sqlda.pgc"
+#line 121 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 115 "sqlda.pgc"
+#line 121 "sqlda.pgc"

 	/* exec sql whenever not found  break ; */
-#line 117 "sqlda.pgc"
+#line 123 "sqlda.pgc"

 	rec = 0;
@@ -281,13 +287,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 123 "sqlda.pgc"
+#line 129 "sqlda.pgc"
 
 if (sqlca.sqlcode == ECPG_NOT_FOUND) break;
-#line 123 "sqlda.pgc"
+#line 129 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 123 "sqlda.pgc"
+#line 129 "sqlda.pgc"

 		printf("FETCH RECORD %d\n", ++rec);
@@ -295,23 +301,23 @@ if (sqlca.sqlcode < 0) exit (1);}
 	}
 
 	/* exec sql whenever not found  continue ; */
-#line 129 "sqlda.pgc"
+#line 135 "sqlda.pgc"

 	strcpy(msg, "close");
 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close mycur1", ECPGt_EOIT, ECPGt_EORT);
-#line 132 "sqlda.pgc"
+#line 138 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 132 "sqlda.pgc"
+#line 138 "sqlda.pgc"

 	strcpy(msg, "deallocate");
 	{ ECPGdeallocate(__LINE__, 0, NULL, "st_id1");
-#line 135 "sqlda.pgc"
+#line 141 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 135 "sqlda.pgc"
+#line 141 "sqlda.pgc"

 	free(outp_sqlda);
@@ -322,35 +328,35 @@ if (sqlca.sqlcode < 0) exit (1);}
 
 	strcpy(msg, "prepare");
 	{ ECPGprepare(__LINE__, NULL, 0, "st_id2", stmt1);
-#line 144 "sqlda.pgc"
+#line 150 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 144 "sqlda.pgc"
+#line 150 "sqlda.pgc"

 	strcpy(msg, "declare");
 	/* declare mycur2 cursor for $1 */
-#line 147 "sqlda.pgc"
+#line 153 "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 150 "sqlda.pgc"
+#line 156 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 150 "sqlda.pgc"
+#line 156 "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 153 "sqlda.pgc"
+#line 159 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 153 "sqlda.pgc"
+#line 159 "sqlda.pgc"

 	outp_sqlda1 = outp_sqlda;
@@ -368,18 +374,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 169 "sqlda.pgc"
+#line 175 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 169 "sqlda.pgc"
+#line 175 "sqlda.pgc"

 	strcpy(msg, "deallocate");
 	{ ECPGdeallocate(__LINE__, 0, NULL, "st_id2");
-#line 172 "sqlda.pgc"
+#line 178 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 172 "sqlda.pgc"
+#line 178 "sqlda.pgc"

 	/* SQLDA test for getting one record using an input descriptor */
@@ -403,10 +409,10 @@ if (sqlca.sqlcode < 0) exit (1);}
 
 	strcpy(msg, "prepare");
 	{ ECPGprepare(__LINE__, NULL, 0, "st_id3", stmt2);
-#line 194 "sqlda.pgc"
+#line 200 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 194 "sqlda.pgc"
+#line 200 "sqlda.pgc"

 	strcpy(msg, "execute");
@@ -415,20 +421,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 197 "sqlda.pgc"
+#line 203 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 197 "sqlda.pgc"
+#line 203 "sqlda.pgc"

 	dump_sqlda(outp_sqlda);
 
 	strcpy(msg, "deallocate");
 	{ ECPGdeallocate(__LINE__, 0, NULL, "st_id3");
-#line 202 "sqlda.pgc"
+#line 208 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 202 "sqlda.pgc"
+#line 208 "sqlda.pgc"

 	free(inp_sqlda);
@@ -439,10 +445,10 @@ if (sqlca.sqlcode < 0) exit (1);}
 	 */
 
 	{ ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , "con2", 0); 
-#line 211 "sqlda.pgc"
+#line 217 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 211 "sqlda.pgc"
+#line 217 "sqlda.pgc"

 	/*
@@ -464,10 +470,10 @@ if (sqlca.sqlcode < 0) exit (1);}
 
 	strcpy(msg, "prepare");
 	{ ECPGprepare(__LINE__, "con2", 0, "st_id4", stmt2);
-#line 231 "sqlda.pgc"
+#line 237 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 231 "sqlda.pgc"
+#line 237 "sqlda.pgc"

 	strcpy(msg, "execute");
@@ -476,28 +482,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 234 "sqlda.pgc"
+#line 240 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 234 "sqlda.pgc"
+#line 240 "sqlda.pgc"

 	dump_sqlda(outp_sqlda);
 
 	strcpy(msg, "commit");
 	{ ECPGtrans(__LINE__, "con2", "commit");
-#line 239 "sqlda.pgc"
+#line 245 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 239 "sqlda.pgc"
+#line 245 "sqlda.pgc"

 	strcpy(msg, "deallocate");
 	{ ECPGdeallocate(__LINE__, 0, NULL, "st_id4");
-#line 242 "sqlda.pgc"
+#line 248 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 242 "sqlda.pgc"
+#line 248 "sqlda.pgc"

 	free(inp_sqlda);
@@ -505,36 +511,36 @@ if (sqlca.sqlcode < 0) exit (1);}
 
 	strcpy(msg, "disconnect");
 	{ ECPGdisconnect(__LINE__, "con2");
-#line 248 "sqlda.pgc"
+#line 254 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 248 "sqlda.pgc"
+#line 254 "sqlda.pgc"

 	/* End test */
 
 	strcpy(msg, "drop");
 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table t1", ECPGt_EOIT, ECPGt_EORT);
-#line 253 "sqlda.pgc"
+#line 259 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 253 "sqlda.pgc"
+#line 259 "sqlda.pgc"

 	strcpy(msg, "commit");
 	{ ECPGtrans(__LINE__, NULL, "commit");
-#line 256 "sqlda.pgc"
+#line 262 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 256 "sqlda.pgc"
+#line 262 "sqlda.pgc"

 	strcpy(msg, "disconnect");
 	{ ECPGdisconnect(__LINE__, "CURRENT");
-#line 259 "sqlda.pgc"
+#line 265 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 259 "sqlda.pgc"
+#line 265 "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 e8c7a3725e..9c3e4849c9 100644
--- a/src/interfaces/ecpg/test/expected/sql-sqlda.stderr
+++ b/src/interfaces/ecpg/test/expected/sql-sqlda.stderr
@@ -2,459 +2,459 @@
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>  
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 81: query: set datestyle to iso; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 87: 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 81: using PQexec
+[NO_PID]: ecpg_execute on line 87: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 81: OK: SET
+[NO_PID]: ecpg_process_output on line 87: OK: SET
 [NO_PID]: sqlca: code: 0, state: 00000
-[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]: ecpg_execute on line 90: 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]: ecpg_execute on line 90: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 84: OK: CREATE TABLE
+[NO_PID]: ecpg_process_output on line 90: OK: CREATE TABLE
 [NO_PID]: sqlca: code: 0, state: 00000
-[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 ) , ( 3 , 'c' , 0.0 , 3 , 'c' , 3333333333333333333 ) , ( 4 , 'd' , 'NaN' , 4 , 'd' , 4444444444444444444 ) , ( 5 , 'e' , 0.001234 , 5 , 'e' , 5555555555555555555 ); with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 100: query: insert into t1 values ( 1 , 'a' , 1.0 , 1 , 'a' , 1111111111111111111 ) , ( 2 , null , null , null , null , null ) , ( 3 , 'c' , 0.0 , 3 , 'c' , 3333333333333333333 ) , ( 4 , 'd' , 'NaN' , 4 , 'd' , 4444444444444444444 ) , ( 5 , 'e' , 0.001234 , 5 , 'e' , 5555555555555555555 ); with 0 parameter(s) on connection regress1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 94: using PQexec
+[NO_PID]: ecpg_execute on line 100: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 94: OK: INSERT 0 5
+[NO_PID]: ecpg_process_output on line 100: OK: INSERT 0 5
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGtrans on line 102: action "commit"; connection "regress1"
+[NO_PID]: ECPGtrans on line 108: action "commit"; connection "regress1"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: prepare_common on line 109: name st_id1; query: "SELECT * FROM t1"
+[NO_PID]: prepare_common on line 115: name st_id1; query: "SELECT * FROM t1"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 115: query: declare mycur1 cursor for SELECT * FROM t1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 121: 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 115: using PQexec
+[NO_PID]: ecpg_execute on line 121: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 115: OK: DECLARE CURSOR
+[NO_PID]: ecpg_process_output on line 121: OK: DECLARE CURSOR
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 123: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 129: 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 123: using PQexec
+[NO_PID]: ecpg_execute on line 129: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 123: correctly got 1 tuples with 6 fields
+[NO_PID]: ecpg_process_output on line 129: correctly got 1 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 123 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 129 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 123: new sqlda was built
+[NO_PID]: ecpg_process_output on line 129: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 123: RESULT: 1 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 129: RESULT: 1 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 1 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 123: RESULT: a offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 129: RESULT: a offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 2 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 123: RESULT: 1 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 129: RESULT: 1 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 123: RESULT: a          offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 129: RESULT: a          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 5 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 123: RESULT: 1111111111111111111 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 129: RESULT: 1111111111111111111 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 123: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 129: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 123: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 129: 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 123: using PQexec
+[NO_PID]: ecpg_execute on line 129: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 123: correctly got 1 tuples with 6 fields
+[NO_PID]: ecpg_process_output on line 129: correctly got 1 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 123 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 129 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 123: new sqlda was built
+[NO_PID]: ecpg_process_output on line 129: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 123: RESULT: 2 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 129: RESULT: 2 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 1 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 1 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 2 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 2 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 3 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 3 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 4 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 4 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 5 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 5 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 123: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 129: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 123: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 129: 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 123: using PQexec
+[NO_PID]: ecpg_execute on line 129: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 123: correctly got 1 tuples with 6 fields
+[NO_PID]: ecpg_process_output on line 129: correctly got 1 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 123 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 129 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 123: new sqlda was built
+[NO_PID]: ecpg_process_output on line 129: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 123: RESULT: 3 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 129: RESULT: 3 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 1 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 123: RESULT: c offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 129: RESULT: c offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 2 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 123: RESULT: 3 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 129: RESULT: 3 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 123: RESULT: c          offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 129: RESULT: c          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 5 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 123: RESULT: 3333333333333333333 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 129: RESULT: 3333333333333333333 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 123: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 129: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 123: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 129: 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 123: using PQexec
+[NO_PID]: ecpg_execute on line 129: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 123: correctly got 1 tuples with 6 fields
+[NO_PID]: ecpg_process_output on line 129: correctly got 1 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 123 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 129 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 123: new sqlda was built
+[NO_PID]: ecpg_process_output on line 129: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 123: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 129: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 1 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 123: RESULT: d offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 129: RESULT: d offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 2 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 123: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 129: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 123: RESULT: d          offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 129: RESULT: d          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 5 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 123: RESULT: 4444444444444444444 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 129: RESULT: 4444444444444444444 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 123: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 129: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 123: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 129: 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 123: using PQexec
+[NO_PID]: ecpg_execute on line 129: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 123: correctly got 1 tuples with 6 fields
+[NO_PID]: ecpg_process_output on line 129: correctly got 1 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 123 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 129 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 123: new sqlda was built
+[NO_PID]: ecpg_process_output on line 129: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 123: RESULT: 5 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 129: RESULT: 5 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 1 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 123: RESULT: e offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 129: RESULT: e offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 2 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 123: RESULT: 5 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 129: RESULT: 5 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 123: RESULT: e          offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 129: RESULT: e          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 123 row 0 col 5 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 129 row 0 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 123: RESULT: 5555555555555555555 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 129: RESULT: 5555555555555555555 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 123: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 129: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 123: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 129: 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 123: using PQexec
+[NO_PID]: ecpg_execute on line 129: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 123: correctly got 0 tuples with 6 fields
+[NO_PID]: ecpg_process_output on line 129: correctly got 0 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: raising sqlcode 100 on line 123: no data found on line 123
+[NO_PID]: raising sqlcode 100 on line 129: no data found on line 129
 [NO_PID]: sqlca: code: 100, state: 02000
-[NO_PID]: ecpg_execute on line 132: query: close mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 138: query: close mycur1; with 0 parameter(s) on connection regress1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 132: using PQexec
+[NO_PID]: ecpg_execute on line 138: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 132: OK: CLOSE CURSOR
+[NO_PID]: ecpg_process_output on line 138: OK: CLOSE CURSOR
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: deallocate_one on line 135: name st_id1
+[NO_PID]: deallocate_one on line 141: name st_id1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: prepare_common on line 144: name st_id2; query: "SELECT * FROM t1"
+[NO_PID]: prepare_common on line 150: name st_id2; query: "SELECT * FROM t1"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 150: query: declare mycur2 cursor for SELECT * FROM t1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 156: 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 150: using PQexec
+[NO_PID]: ecpg_execute on line 156: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 150: OK: DECLARE CURSOR
+[NO_PID]: ecpg_process_output on line 156: OK: DECLARE CURSOR
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 153: query: fetch all from mycur2; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 159: 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 153: using PQexec
+[NO_PID]: ecpg_execute on line 159: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 153: correctly got 5 tuples with 6 fields
+[NO_PID]: ecpg_process_output on line 159: correctly got 5 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 153 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 159 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 153: new sqlda was built
+[NO_PID]: ecpg_process_output on line 159: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 4 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 4 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 153: RESULT: 5 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 159: RESULT: 5 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 4 col 1 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 4 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 153: RESULT: e offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 159: RESULT: e offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 4 col 2 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 4 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 4 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 4 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 153: RESULT: 5 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 159: RESULT: 5 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 4 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 4 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 153: RESULT: e          offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 159: RESULT: e          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 4 col 5 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 4 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 153: RESULT: 5555555555555555555 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 159: RESULT: 5555555555555555555 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 153: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 159: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 153 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 159 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 153: new sqlda was built
+[NO_PID]: ecpg_process_output on line 159: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 3 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 3 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 153: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 159: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 3 col 1 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 3 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 153: RESULT: d offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 159: RESULT: d offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 3 col 2 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 3 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 3 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 3 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 153: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 159: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 3 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 3 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 153: RESULT: d          offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 159: RESULT: d          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 3 col 5 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 3 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 153: RESULT: 4444444444444444444 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 159: RESULT: 4444444444444444444 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 153: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 159: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 153 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 159 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 153: new sqlda was built
+[NO_PID]: ecpg_process_output on line 159: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 2 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 2 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 153: RESULT: 3 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 159: RESULT: 3 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 2 col 1 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 2 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 153: RESULT: c offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 159: RESULT: c offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 2 col 2 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 2 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 2 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 2 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 153: RESULT: 3 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 159: RESULT: 3 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 2 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 2 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 153: RESULT: c          offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 159: RESULT: c          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 2 col 5 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 2 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 153: RESULT: 3333333333333333333 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 159: RESULT: 3333333333333333333 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 153: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 159: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 153 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 159 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 153: new sqlda was built
+[NO_PID]: ecpg_process_output on line 159: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 1 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 1 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 153: RESULT: 2 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 159: RESULT: 2 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 1 col 1 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 1 col 1 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 1 col 2 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 1 col 2 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 1 col 3 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 1 col 3 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 1 col 4 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 1 col 4 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 1 col 5 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 1 col 5 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 153: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 159: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 153 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 159 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 153: new sqlda was built
+[NO_PID]: ecpg_process_output on line 159: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 0 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 0 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 153: RESULT: 1 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 159: RESULT: 1 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 0 col 1 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 0 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 153: RESULT: a offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 159: RESULT: a offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 0 col 2 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 0 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 0 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 0 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 153: RESULT: 1 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 159: RESULT: 1 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 0 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 0 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 153: RESULT: a          offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 159: RESULT: a          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 153 row 0 col 5 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 159 row 0 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 153: RESULT: 1111111111111111111 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 159: RESULT: 1111111111111111111 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 153: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 159: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 169: query: close mycur2; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 175: query: close mycur2; with 0 parameter(s) on connection regress1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 169: using PQexec
+[NO_PID]: ecpg_execute on line 175: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 169: OK: CLOSE CURSOR
+[NO_PID]: ecpg_process_output on line 175: OK: CLOSE CURSOR
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: deallocate_one on line 172: name st_id2
+[NO_PID]: deallocate_one on line 178: name st_id2
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: prepare_common on line 194: name st_id3; query: "SELECT * FROM t1 WHERE id = $1"
+[NO_PID]: prepare_common on line 200: name st_id3; query: "SELECT * FROM t1 WHERE id = $1"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 197: query: SELECT * FROM t1 WHERE id = $1; with 1 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 203: query: SELECT * FROM t1 WHERE id = $1; with 1 parameter(s) on connection regress1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 197: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1"
+[NO_PID]: ecpg_execute on line 203: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_free_params on line 197: parameter 1 = 4
+[NO_PID]: ecpg_free_params on line 203: parameter 1 = 4
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 197: correctly got 1 tuples with 6 fields
+[NO_PID]: ecpg_process_output on line 203: correctly got 1 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 197 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 203 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 197: new sqlda was built
+[NO_PID]: ecpg_process_output on line 203: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 197 row 0 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 203 row 0 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 197: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 203: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 197 row 0 col 1 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 203 row 0 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 197: RESULT: d offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 203: RESULT: d offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 197 row 0 col 2 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 203 row 0 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 197 row 0 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 203 row 0 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 197: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 203: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 197 row 0 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 203 row 0 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 197: RESULT: d          offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 203: RESULT: d          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 197 row 0 col 5 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 203 row 0 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 197: RESULT: 4444444444444444444 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 203: RESULT: 4444444444444444444 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 197: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 203: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: deallocate_one on line 202: name st_id3
+[NO_PID]: deallocate_one on line 208: name st_id3
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>  
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: prepare_common on line 231: name st_id4; query: "SELECT * FROM t1 WHERE id = $1"
+[NO_PID]: prepare_common on line 237: name st_id4; query: "SELECT * FROM t1 WHERE id = $1"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 234: query: SELECT * FROM t1 WHERE id = $1; with 1 parameter(s) on connection con2
+[NO_PID]: ecpg_execute on line 240: 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 234: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1"
+[NO_PID]: ecpg_execute on line 240: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_free_params on line 234: parameter 1 = 4
+[NO_PID]: ecpg_free_params on line 240: parameter 1 = 4
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 234: correctly got 1 tuples with 6 fields
+[NO_PID]: ecpg_process_output on line 240: correctly got 1 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 234 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 240 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 234: new sqlda was built
+[NO_PID]: ecpg_process_output on line 240: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 234 row 0 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 240 row 0 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 234: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 240: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 234 row 0 col 1 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 240 row 0 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 234: RESULT: d offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 240: RESULT: d offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 234 row 0 col 2 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 240 row 0 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 234 row 0 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 240 row 0 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 234: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 240: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 234 row 0 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 240 row 0 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 234: RESULT: d          offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 240: RESULT: d          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 234 row 0 col 5 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 240 row 0 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 234: RESULT: 4444444444444444444 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 240: RESULT: 4444444444444444444 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 234: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 240: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGtrans on line 239: action "commit"; connection "con2"
+[NO_PID]: ECPGtrans on line 245: action "commit"; connection "con2"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: deallocate_one on line 242: name st_id4
+[NO_PID]: deallocate_one on line 248: 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 253: query: drop table t1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 259: query: drop table t1; with 0 parameter(s) on connection regress1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 253: using PQexec
+[NO_PID]: ecpg_execute on line 259: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 253: OK: DROP TABLE
+[NO_PID]: ecpg_process_output on line 259: OK: DROP TABLE
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGtrans on line 256: action "commit"; connection "regress1"
+[NO_PID]: ECPGtrans on line 262: 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/sql/sqlda.pgc b/src/interfaces/ecpg/test/sql/sqlda.pgc
index f54b7e3c94..9a665511d0 100644
--- a/src/interfaces/ecpg/test/sql/sqlda.pgc
+++ b/src/interfaces/ecpg/test/sql/sqlda.pgc
@@ -41,7 +41,13 @@ dump_sqlda(sqlda_t *sqlda)
 			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);
+			printf(
+#ifdef _WIN32
+				"name sqlda descriptor: '%s' value %I64d\n",
+#else
+				"name sqlda descriptor: '%s' value %lld\n",
+#endif
+				sqlda->sqlvar[i].sqlname.data, *(long long int *)sqlda->sqlvar[i].sqldata);
 			break;
 #endif
 		case ECPGt_double:
-- 
2.23.0

---

From: Michael Meskes <[email-masked]>
Date: Sat, 26 Oct 2019 10:40:54 +0200

> determine the appropriate format conversion the hard way.

I don't think such porting efforts are worth it for a single test case,
or in other words, if you ask me go ahead with your patch.

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL

---

From: Peter Eisentraut <[email-masked]>
Date: Tue, 29 Oct 2019 09:40:48 +0100

> or in other words, if you ask me go ahead with your patch.

committed

---

From: Andres Freund <[email-masked]>
Date: Thu, 30 Oct 2025 17:39:24 -0400

Hi,

On 2024-12-06 15:44:20 +1300, Thomas Munro wrote:
> On Fri, Dec 6, 2024 at 4:13 AM Tom Lane <[email-masked]> wrote:
> > Thomas Munro <[email-masked]> writes:
> > > Yeah.  This warning is visible on CI, and on fairywren since its MSYS2
> > > upgrade a couple of months ago.  Old MinGW didn't like %lld (I think
> > > perhaps the printf from msvcrt.dll from 1996 didn't like it and MinGW
> > > knew that), but new MinGW doesn't like %I64d (that's interesting, but
> > > not relevant here because %lld is clearly the correct format string,
> > > and it works).  We should just revert that change.  Here's a patch.
> >
> > +1
> 
> Thanks for looking.  Pushed, and that fixed that on fairywren.
> 
> > > Those were there before the upgrade.  POSIX says that environ should
> > > not be declared by a header, but Windows apparently declares it, or at
> > > least its cousin _environ, in <stdlib.h> which we include in c.h.  I
> > > have no idea why Visual Studio doesn't warn, or why the documentation
> > > only tells you about _environ and not environ, or where the macro (?)
> > > comes from that renames it, but it passes CI and is
> > > warning-free on both toolchains if you just hide the offending
> > > declarations.
> >
> > Isn't this likely to break things for every other Windows toolchain?
> > I think the concept might be OK, but we need a tighter #if condition.
> 
> Cool, I'll do that for MinGW only then.

I was looking at merging [1], however the backbranches < 18 fail in
CompilerWarnings due to this error [2], after upgrading to trixie. Seems like
we ought to backpatch 7bc9a8bdd2d.  Haven't checked yet whether 1319997d is
also required for a clean build.

Greetings,

Andres Freund

[1] https://postgr.es/m/CAN55FZ1_B1usTskAv%2BAYt1bA7abVd9YH6XrUUSbr-2Z0d5Wd8w%40mail.gmail.com
[2] https://cirrus-ci.com/task/6526575971139584

---

From: Andres Freund <[email-masked]>
Date: Tue, 4 Nov 2025 13:34:29 -0500

Hi,

> also required for a clean build.

After verifying that 1319997d is not required I backpatched 7bc9a8bdd2d to all
the branches lacking it.

Greetings,

Andres Freund