On Fri, Nov 10, 2023 at 9:00 PM Hayato Kuroda (Fujitsu)
<kuroda.hay...@fujitsu.com> wrote:
> Sorry for reviving the old thread. While trying to build postgres on msys2 by 
> meson,
> I faced the same warning. The OS is Windows 10.

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.

That leaves only three more annoying warnings:

../pgsql/src/backend/postmaster/postmaster.c:857:31: warning:
'__p__environ' redeclared without dllimport attribute: previous
dllimport ignored [-Wattributes]
  857 |                 extern char **environ;

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.
From de99776710ed62fd237b9c1d4abd2b3c7f400517 Mon Sep 17 00:00:00 2001
From: Thomas Munro <thomas.munro@gmail.com>
Date: Thu, 5 Dec 2024 22:57:34 +1300
Subject: [PATCH 1/2] Fix printf format string warning on MinGW.

Commit 517bf2d91 changed a printf format string to placate MinGW happy
happy.  Apparently this was because MinGW knew that ancient msvcrt.dll's
printf didn't understand %lld, but current MinGW is now warnings about
the use of %I64d, which it clearly doesn't understand.  Reverting that
change clears the warning on CI, and hopefully also on build farm animal
fairwren.

Reported-by: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
Discussion: https://postgr.es/m/TYAPR01MB5866A71B744BE01B3BF71791F5AEA%40TYAPR01MB5866.jpnprd01.prod.outlook.com
---
 src/interfaces/ecpg/test/expected/sql-sqlda.c | 137 +++---
 .../ecpg/test/expected/sql-sqlda.stderr       | 450 +++++++++---------
 src/interfaces/ecpg/test/sql/sqlda.pgc        |   9 +-
 3 files changed, 293 insertions(+), 303 deletions(-)

diff --git a/src/interfaces/ecpg/test/expected/sql-sqlda.c b/src/interfaces/ecpg/test/expected/sql-sqlda.c
index ee1a674271f..10ebba3cbb7 100644
--- a/src/interfaces/ecpg/test/expected/sql-sqlda.c
+++ b/src/interfaces/ecpg/test/expected/sql-sqlda.c
@@ -155,13 +155,8 @@ dump_sqlda(sqlda_t *sqlda)
 			printf("name sqlda descriptor: '%s' value %ld\n", sqlda->sqlvar[i].sqlname.data, *(long int *)sqlda->sqlvar[i].sqldata);
 			break;
 		case ECPGt_long_long:
-			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);
+			printf("name sqlda descriptor: '%s' value %lld\n",
+				   sqlda->sqlvar[i].sqlname.data, *(long long int *)sqlda->sqlvar[i].sqldata);
 			break;
 		case ECPGt_double:
 			printf("name sqlda descriptor: '%s' value %f\n", sqlda->sqlvar[i].sqlname.data, *(double *)sqlda->sqlvar[i].sqldata);
@@ -188,19 +183,19 @@ main (void)
 		
 		
 
-#line 71 "sqlda.pgc"
+#line 66 "sqlda.pgc"
  char * stmt1 = "SELECT * FROM t1" ;
  
-#line 72 "sqlda.pgc"
+#line 67 "sqlda.pgc"
  char * stmt2 = "SELECT * FROM t1 WHERE id = ?" ;
  
-#line 73 "sqlda.pgc"
+#line 68 "sqlda.pgc"
  int rec ;
  
-#line 74 "sqlda.pgc"
+#line 69 "sqlda.pgc"
  int id ;
 /* exec sql end declare section */
-#line 75 "sqlda.pgc"
+#line 70 "sqlda.pgc"
 
 
 	char msg[128];
@@ -209,42 +204,42 @@ main (void)
 
 	strcpy(msg, "connect");
 	{ ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , "regress1", 0); 
-#line 82 "sqlda.pgc"
+#line 77 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 82 "sqlda.pgc"
+#line 77 "sqlda.pgc"
 
 
 	strcpy(msg, "set");
 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set datestyle to iso", ECPGt_EOIT, ECPGt_EORT);
-#line 85 "sqlda.pgc"
+#line 80 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 85 "sqlda.pgc"
+#line 80 "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 95 "sqlda.pgc"
+#line 90 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 95 "sqlda.pgc"
+#line 90 "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 103 "sqlda.pgc"
+#line 98 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 103 "sqlda.pgc"
+#line 98 "sqlda.pgc"
 
 
 	strcpy(msg, "commit");
 	{ ECPGtrans(__LINE__, NULL, "commit");
-#line 106 "sqlda.pgc"
+#line 101 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 106 "sqlda.pgc"
+#line 101 "sqlda.pgc"
 
 
 	/* SQLDA test for getting all records from a table */
@@ -253,29 +248,29 @@ if (sqlca.sqlcode < 0) exit (1);}
 
 	strcpy(msg, "prepare");
 	{ ECPGprepare(__LINE__, NULL, 0, "st_id1", stmt1);
-#line 113 "sqlda.pgc"
+#line 108 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 113 "sqlda.pgc"
+#line 108 "sqlda.pgc"
 
 
 	strcpy(msg, "declare");
 	/* declare mycur1 cursor for $1 */
-#line 116 "sqlda.pgc"
+#line 111 "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 119 "sqlda.pgc"
+#line 114 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 119 "sqlda.pgc"
+#line 114 "sqlda.pgc"
 
 
 	/* exec sql whenever not found  break ; */
-#line 121 "sqlda.pgc"
+#line 116 "sqlda.pgc"
 
 
 	rec = 0;
@@ -285,13 +280,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 127 "sqlda.pgc"
+#line 122 "sqlda.pgc"
 
 if (sqlca.sqlcode == ECPG_NOT_FOUND) break;
-#line 127 "sqlda.pgc"
+#line 122 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 127 "sqlda.pgc"
+#line 122 "sqlda.pgc"
 
 
 		printf("FETCH RECORD %d\n", ++rec);
@@ -299,23 +294,23 @@ if (sqlca.sqlcode < 0) exit (1);}
 	}
 
 	/* exec sql whenever not found  continue ; */
-#line 133 "sqlda.pgc"
+#line 128 "sqlda.pgc"
 
 
 	strcpy(msg, "close");
 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close mycur1", ECPGt_EOIT, ECPGt_EORT);
-#line 136 "sqlda.pgc"
+#line 131 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 136 "sqlda.pgc"
+#line 131 "sqlda.pgc"
 
 
 	strcpy(msg, "deallocate");
 	{ ECPGdeallocate(__LINE__, 0, NULL, "st_id1");
-#line 139 "sqlda.pgc"
+#line 134 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 139 "sqlda.pgc"
+#line 134 "sqlda.pgc"
 
 
 	free(outp_sqlda);
@@ -326,35 +321,35 @@ if (sqlca.sqlcode < 0) exit (1);}
 
 	strcpy(msg, "prepare");
 	{ ECPGprepare(__LINE__, NULL, 0, "st_id2", stmt1);
-#line 148 "sqlda.pgc"
+#line 143 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 148 "sqlda.pgc"
+#line 143 "sqlda.pgc"
 
 
 	strcpy(msg, "declare");
 	/* declare mycur2 cursor for $1 */
-#line 151 "sqlda.pgc"
+#line 146 "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 154 "sqlda.pgc"
+#line 149 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 154 "sqlda.pgc"
+#line 149 "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 157 "sqlda.pgc"
+#line 152 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 157 "sqlda.pgc"
+#line 152 "sqlda.pgc"
 
 
 	outp_sqlda1 = outp_sqlda;
@@ -372,18 +367,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 173 "sqlda.pgc"
+#line 168 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 173 "sqlda.pgc"
+#line 168 "sqlda.pgc"
 
 
 	strcpy(msg, "deallocate");
 	{ ECPGdeallocate(__LINE__, 0, NULL, "st_id2");
-#line 176 "sqlda.pgc"
+#line 171 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 176 "sqlda.pgc"
+#line 171 "sqlda.pgc"
 
 
 	/* SQLDA test for getting one record using an input descriptor */
@@ -407,10 +402,10 @@ if (sqlca.sqlcode < 0) exit (1);}
 
 	strcpy(msg, "prepare");
 	{ ECPGprepare(__LINE__, NULL, 0, "st_id3", stmt2);
-#line 198 "sqlda.pgc"
+#line 193 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 198 "sqlda.pgc"
+#line 193 "sqlda.pgc"
 
 
 	strcpy(msg, "execute");
@@ -419,20 +414,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 201 "sqlda.pgc"
+#line 196 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 201 "sqlda.pgc"
+#line 196 "sqlda.pgc"
 
 
 	dump_sqlda(outp_sqlda);
 
 	strcpy(msg, "deallocate");
 	{ ECPGdeallocate(__LINE__, 0, NULL, "st_id3");
-#line 206 "sqlda.pgc"
+#line 201 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 206 "sqlda.pgc"
+#line 201 "sqlda.pgc"
 
 
 	free(inp_sqlda);
@@ -443,10 +438,10 @@ if (sqlca.sqlcode < 0) exit (1);}
 	 */
 
 	{ ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , "con2", 0); 
-#line 215 "sqlda.pgc"
+#line 210 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 215 "sqlda.pgc"
+#line 210 "sqlda.pgc"
 
 
 	/*
@@ -468,10 +463,10 @@ if (sqlca.sqlcode < 0) exit (1);}
 
 	strcpy(msg, "prepare");
 	{ ECPGprepare(__LINE__, "con2", 0, "st_id4", stmt2);
-#line 235 "sqlda.pgc"
+#line 230 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 235 "sqlda.pgc"
+#line 230 "sqlda.pgc"
 
 
 	strcpy(msg, "execute");
@@ -480,28 +475,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 238 "sqlda.pgc"
+#line 233 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 238 "sqlda.pgc"
+#line 233 "sqlda.pgc"
 
 
 	dump_sqlda(outp_sqlda);
 
 	strcpy(msg, "commit");
 	{ ECPGtrans(__LINE__, "con2", "commit");
-#line 243 "sqlda.pgc"
+#line 238 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 243 "sqlda.pgc"
+#line 238 "sqlda.pgc"
 
 
 	strcpy(msg, "deallocate");
 	{ ECPGdeallocate(__LINE__, 0, NULL, "st_id4");
-#line 246 "sqlda.pgc"
+#line 241 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 246 "sqlda.pgc"
+#line 241 "sqlda.pgc"
 
 
 	free(inp_sqlda);
@@ -509,36 +504,36 @@ if (sqlca.sqlcode < 0) exit (1);}
 
 	strcpy(msg, "disconnect");
 	{ ECPGdisconnect(__LINE__, "con2");
-#line 252 "sqlda.pgc"
+#line 247 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 252 "sqlda.pgc"
+#line 247 "sqlda.pgc"
 
 
 	/* End test */
 
 	strcpy(msg, "drop");
 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table t1", ECPGt_EOIT, ECPGt_EORT);
-#line 257 "sqlda.pgc"
+#line 252 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 257 "sqlda.pgc"
+#line 252 "sqlda.pgc"
 
 
 	strcpy(msg, "commit");
 	{ ECPGtrans(__LINE__, NULL, "commit");
-#line 260 "sqlda.pgc"
+#line 255 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 260 "sqlda.pgc"
+#line 255 "sqlda.pgc"
 
 
 	strcpy(msg, "disconnect");
 	{ ECPGdisconnect(__LINE__, "CURRENT");
-#line 263 "sqlda.pgc"
+#line 258 "sqlda.pgc"
 
 if (sqlca.sqlcode < 0) exit (1);}
-#line 263 "sqlda.pgc"
+#line 258 "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 dfe6b13055f..51ef236a50e 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 85: query: set datestyle to iso; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 80: 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 85: using PQexec
+[NO_PID]: ecpg_execute on line 80: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 85: OK: SET
+[NO_PID]: ecpg_process_output on line 80: OK: SET
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 88: 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 83: 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 88: using PQexec
+[NO_PID]: ecpg_execute on line 83: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 88: OK: CREATE TABLE
+[NO_PID]: ecpg_process_output on line 83: OK: CREATE TABLE
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 98: 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 93: 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 98: using PQexec
+[NO_PID]: ecpg_execute on line 93: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 98: OK: INSERT 0 5
+[NO_PID]: ecpg_process_output on line 93: OK: INSERT 0 5
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGtrans on line 106: action "commit"; connection "regress1"
+[NO_PID]: ECPGtrans on line 101: action "commit"; connection "regress1"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: prepare_common on line 113: name st_id1; query: "SELECT * FROM t1"
+[NO_PID]: prepare_common on line 108: name st_id1; query: "SELECT * FROM t1"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 119: query: declare mycur1 cursor for SELECT * FROM t1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 114: 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 119: using PQexec
+[NO_PID]: ecpg_execute on line 114: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 119: OK: DECLARE CURSOR
+[NO_PID]: ecpg_process_output on line 114: OK: DECLARE CURSOR
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 127: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 122: 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 127: using PQexec
+[NO_PID]: ecpg_execute on line 122: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 127: correctly got 1 tuples with 6 fields
+[NO_PID]: ecpg_process_output on line 122: correctly got 1 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 127 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 122 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 127: new sqlda was built
+[NO_PID]: ecpg_process_output on line 122: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 127: RESULT: 1 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 122: RESULT: 1 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 1 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 127: RESULT: a offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 122: RESULT: a offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 2 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 127: RESULT: 1 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 122: RESULT: 1 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 127: RESULT: a          offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 122: RESULT: a          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 5 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 127: RESULT: 1111111111111111111 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 122: RESULT: 1111111111111111111 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 127: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 122: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 127: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 122: 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 127: using PQexec
+[NO_PID]: ecpg_execute on line 122: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 127: correctly got 1 tuples with 6 fields
+[NO_PID]: ecpg_process_output on line 122: correctly got 1 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 127 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 122 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 127: new sqlda was built
+[NO_PID]: ecpg_process_output on line 122: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 127: RESULT: 2 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 122: RESULT: 2 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 1 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 1 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 2 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 2 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 3 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 3 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 4 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 4 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 5 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 5 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 127: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 122: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 127: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 122: 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 127: using PQexec
+[NO_PID]: ecpg_execute on line 122: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 127: correctly got 1 tuples with 6 fields
+[NO_PID]: ecpg_process_output on line 122: correctly got 1 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 127 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 122 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 127: new sqlda was built
+[NO_PID]: ecpg_process_output on line 122: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 127: RESULT: 3 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 122: RESULT: 3 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 1 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 127: RESULT: c offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 122: RESULT: c offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 2 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 127: RESULT: 3 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 122: RESULT: 3 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 127: RESULT: c          offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 122: RESULT: c          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 5 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 127: RESULT: 3333333333333333333 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 122: RESULT: 3333333333333333333 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 127: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 122: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 127: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 122: 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 127: using PQexec
+[NO_PID]: ecpg_execute on line 122: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 127: correctly got 1 tuples with 6 fields
+[NO_PID]: ecpg_process_output on line 122: correctly got 1 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 127 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 122 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 127: new sqlda was built
+[NO_PID]: ecpg_process_output on line 122: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 127: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 122: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 1 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 127: RESULT: d offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 122: RESULT: d offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 2 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 127: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 122: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 127: RESULT: d          offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 122: RESULT: d          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 5 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 127: RESULT: 4444444444444444444 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 122: RESULT: 4444444444444444444 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 127: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 122: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 127: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 122: 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 127: using PQexec
+[NO_PID]: ecpg_execute on line 122: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 127: correctly got 1 tuples with 6 fields
+[NO_PID]: ecpg_process_output on line 122: correctly got 1 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 127 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 122 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 127: new sqlda was built
+[NO_PID]: ecpg_process_output on line 122: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 127: RESULT: 5 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 122: RESULT: 5 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 1 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 127: RESULT: e offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 122: RESULT: e offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 2 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 127: RESULT: 5 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 122: RESULT: 5 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 127: RESULT: e          offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 122: RESULT: e          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 5 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 122 row 0 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 127: RESULT: 5555555555555555555 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 122: RESULT: 5555555555555555555 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 127: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 122: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 127: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 122: 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 127: using PQexec
+[NO_PID]: ecpg_execute on line 122: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 127: correctly got 0 tuples with 6 fields
+[NO_PID]: ecpg_process_output on line 122: correctly got 0 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: raising sqlcode 100 on line 127: no data found on line 127
+[NO_PID]: raising sqlcode 100 on line 122: no data found on line 122
 [NO_PID]: sqlca: code: 100, state: 02000
-[NO_PID]: ecpg_execute on line 136: query: close mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 131: query: close mycur1; with 0 parameter(s) on connection regress1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 136: using PQexec
+[NO_PID]: ecpg_execute on line 131: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 136: OK: CLOSE CURSOR
+[NO_PID]: ecpg_process_output on line 131: OK: CLOSE CURSOR
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: deallocate_one on line 139: name st_id1
+[NO_PID]: deallocate_one on line 134: name st_id1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: prepare_common on line 148: name st_id2; query: "SELECT * FROM t1"
+[NO_PID]: prepare_common on line 143: name st_id2; query: "SELECT * FROM t1"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 154: query: declare mycur2 cursor for SELECT * FROM t1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 149: 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 154: using PQexec
+[NO_PID]: ecpg_execute on line 149: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 154: OK: DECLARE CURSOR
+[NO_PID]: ecpg_process_output on line 149: OK: DECLARE CURSOR
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 157: query: fetch all from mycur2; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 152: 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 157: using PQexec
+[NO_PID]: ecpg_execute on line 152: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 157: correctly got 5 tuples with 6 fields
+[NO_PID]: ecpg_process_output on line 152: correctly got 5 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 157 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 152 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 157: new sqlda was built
+[NO_PID]: ecpg_process_output on line 152: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 4 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 4 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 157: RESULT: 5 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 152: RESULT: 5 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 4 col 1 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 4 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 157: RESULT: e offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 152: RESULT: e offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 4 col 2 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 4 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 4 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 4 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 157: RESULT: 5 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 152: RESULT: 5 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 4 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 4 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 157: RESULT: e          offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 152: RESULT: e          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 4 col 5 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 4 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 157: RESULT: 5555555555555555555 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 152: RESULT: 5555555555555555555 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 157: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 152: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 157 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 152 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 157: new sqlda was built
+[NO_PID]: ecpg_process_output on line 152: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 3 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 3 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 157: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 152: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 3 col 1 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 3 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 157: RESULT: d offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 152: RESULT: d offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 3 col 2 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 3 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 3 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 3 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 157: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 152: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 3 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 3 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 157: RESULT: d          offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 152: RESULT: d          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 3 col 5 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 3 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 157: RESULT: 4444444444444444444 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 152: RESULT: 4444444444444444444 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 157: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 152: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 157 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 152 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 157: new sqlda was built
+[NO_PID]: ecpg_process_output on line 152: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 2 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 2 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 157: RESULT: 3 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 152: RESULT: 3 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 2 col 1 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 2 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 157: RESULT: c offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 152: RESULT: c offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 2 col 2 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 2 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 2 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 2 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 157: RESULT: 3 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 152: RESULT: 3 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 2 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 2 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 157: RESULT: c          offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 152: RESULT: c          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 2 col 5 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 2 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 157: RESULT: 3333333333333333333 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 152: RESULT: 3333333333333333333 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 157: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 152: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 157 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 152 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 157: new sqlda was built
+[NO_PID]: ecpg_process_output on line 152: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 1 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 1 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 157: RESULT: 2 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 152: RESULT: 2 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 1 col 1 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 1 col 1 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 1 col 2 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 1 col 2 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 1 col 3 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 1 col 3 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 1 col 4 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 1 col 4 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 1 col 5 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 1 col 5 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 157: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 152: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 157 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 152 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 157: new sqlda was built
+[NO_PID]: ecpg_process_output on line 152: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 0 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 0 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 157: RESULT: 1 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 152: RESULT: 1 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 0 col 1 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 0 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 157: RESULT: a offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 152: RESULT: a offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 0 col 2 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 0 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 0 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 0 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 157: RESULT: 1 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 152: RESULT: 1 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 0 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 0 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 157: RESULT: a          offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 152: RESULT: a          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 157 row 0 col 5 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 152 row 0 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 157: RESULT: 1111111111111111111 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 152: RESULT: 1111111111111111111 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 157: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 152: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 173: query: close mycur2; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 168: query: close mycur2; with 0 parameter(s) on connection regress1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 173: using PQexec
+[NO_PID]: ecpg_execute on line 168: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 173: OK: CLOSE CURSOR
+[NO_PID]: ecpg_process_output on line 168: OK: CLOSE CURSOR
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: deallocate_one on line 176: name st_id2
+[NO_PID]: deallocate_one on line 171: name st_id2
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: prepare_common on line 198: name st_id3; query: "SELECT * FROM t1 WHERE id = $1"
+[NO_PID]: prepare_common on line 193: name st_id3; query: "SELECT * FROM t1 WHERE id = $1"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 201: query: SELECT * FROM t1 WHERE id = $1; with 1 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 196: 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 201: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1"
+[NO_PID]: ecpg_execute on line 196: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_free_params on line 201: parameter 1 = 4
+[NO_PID]: ecpg_free_params on line 196: parameter 1 = 4
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 201: correctly got 1 tuples with 6 fields
+[NO_PID]: ecpg_process_output on line 196: correctly got 1 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 201 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 196 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 201: new sqlda was built
+[NO_PID]: ecpg_process_output on line 196: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 201 row 0 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 196 row 0 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 201: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 196: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 201 row 0 col 1 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 196 row 0 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 201: RESULT: d offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 196: RESULT: d offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 201 row 0 col 2 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 196 row 0 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 201 row 0 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 196 row 0 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 201: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 196: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 201 row 0 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 196 row 0 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 201: RESULT: d          offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 196: RESULT: d          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 201 row 0 col 5 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 196 row 0 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 201: RESULT: 4444444444444444444 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 196: RESULT: 4444444444444444444 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 201: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 196: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: deallocate_one on line 206: name st_id3
+[NO_PID]: deallocate_one on line 201: 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 235: name st_id4; query: "SELECT * FROM t1 WHERE id = $1"
+[NO_PID]: prepare_common on line 230: name st_id4; query: "SELECT * FROM t1 WHERE id = $1"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 238: query: SELECT * FROM t1 WHERE id = $1; with 1 parameter(s) on connection con2
+[NO_PID]: ecpg_execute on line 233: 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 238: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1"
+[NO_PID]: ecpg_execute on line 233: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_free_params on line 238: parameter 1 = 4
+[NO_PID]: ecpg_free_params on line 233: parameter 1 = 4
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 238: correctly got 1 tuples with 6 fields
+[NO_PID]: ecpg_process_output on line 233: correctly got 1 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 238 sqld = 6
+[NO_PID]: ecpg_build_native_sqlda on line 233 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 238: new sqlda was built
+[NO_PID]: ecpg_process_output on line 233: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 238 row 0 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 233 row 0 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 238: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 233: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 238 row 0 col 1 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 233 row 0 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 238: RESULT: d offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 233: RESULT: d offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 238 row 0 col 2 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 233 row 0 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 238 row 0 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 233 row 0 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 238: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 233: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 238 row 0 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 233 row 0 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 238: RESULT: d          offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 233: RESULT: d          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 238 row 0 col 5 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 233 row 0 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 238: RESULT: 4444444444444444444 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 233: RESULT: 4444444444444444444 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 238: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 233: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGtrans on line 243: action "commit"; connection "con2"
+[NO_PID]: ECPGtrans on line 238: action "commit"; connection "con2"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: deallocate_one on line 246: name st_id4
+[NO_PID]: deallocate_one on line 241: 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 257: query: drop table t1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 252: query: drop table t1; with 0 parameter(s) on connection regress1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 257: using PQexec
+[NO_PID]: ecpg_execute on line 252: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 257: OK: DROP TABLE
+[NO_PID]: ecpg_process_output on line 252: OK: DROP TABLE
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGtrans on line 260: action "commit"; connection "regress1"
+[NO_PID]: ECPGtrans on line 255: 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 e551385eaa4..f7aa296ebf9 100644
--- a/src/interfaces/ecpg/test/sql/sqlda.pgc
+++ b/src/interfaces/ecpg/test/sql/sqlda.pgc
@@ -40,13 +40,8 @@ dump_sqlda(sqlda_t *sqlda)
 			printf("name sqlda descriptor: '%s' value %ld\n", sqlda->sqlvar[i].sqlname.data, *(long int *)sqlda->sqlvar[i].sqldata);
 			break;
 		case ECPGt_long_long:
-			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);
+			printf("name sqlda descriptor: '%s' value %lld\n",
+				   sqlda->sqlvar[i].sqlname.data, *(long long int *)sqlda->sqlvar[i].sqldata);
 			break;
 		case ECPGt_double:
 			printf("name sqlda descriptor: '%s' value %f\n", sqlda->sqlvar[i].sqlname.data, *(double *)sqlda->sqlvar[i].sqldata);
-- 
2.39.5

From 669818e186bbd16bc0cfcdc444677e64332eb719 Mon Sep 17 00:00:00 2001
From: Thomas Munro <thomas.munro@gmail.com>
Date: Thu, 5 Dec 2024 23:51:57 +1300
Subject: [PATCH 2/2] Fix warnings about declaration of environ on MinGW.

POSIX says that the global variable environ shouldn't be declared in a
header, and you have to declare it yourself, as we do in three places.
Windows declares it in <stdlib.h>, and then MinGW warns that our
redeclarations lacks a dllimport attribute, as seen on CI and fairywren.
Let's just hide our declarations from Windows.
---
 src/backend/postmaster/postmaster.c | 2 ++
 src/backend/utils/misc/ps_status.c  | 3 +++
 src/test/regress/regress.c          | 2 ++
 3 files changed, 7 insertions(+)

diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index ce00f4032ee..450ef7f6e0d 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -854,7 +854,9 @@ PostmasterMain(int argc, char *argv[])
 	/* For debugging: display postmaster environment */
 	if (message_level_is_interesting(DEBUG3))
 	{
+#ifndef WIN32
 		extern char **environ;
+#endif
 		char	  **p;
 		StringInfoData si;
 
diff --git a/src/backend/utils/misc/ps_status.c b/src/backend/utils/misc/ps_status.c
index 9da63774020..f4ec7051037 100644
--- a/src/backend/utils/misc/ps_status.c
+++ b/src/backend/utils/misc/ps_status.c
@@ -23,7 +23,10 @@
 #include "utils/guc.h"
 #include "utils/ps_status.h"
 
+
+#ifndef WIN32
 extern char **environ;
+#endif
 
 /* GUC variable */
 bool		update_process_title = DEFAULT_UPDATE_PROCESS_TITLE;
diff --git a/src/test/regress/regress.c b/src/test/regress/regress.c
index 8309166f5b2..f0aaa620302 100644
--- a/src/test/regress/regress.c
+++ b/src/test/regress/regress.c
@@ -647,7 +647,9 @@ PG_FUNCTION_INFO_V1(get_environ);
 Datum
 get_environ(PG_FUNCTION_ARGS)
 {
+#ifndef WIN32
 	extern char **environ;
+#endif
 	int			nvals = 0;
 	ArrayType  *result;
 	Datum	   *env;
-- 
2.39.5

Reply via email to