diff -dcrpN postgresql/src/interfaces/ecpg/preproc/ecpg.addons postgresql.1/src/interfaces/ecpg/preproc/ecpg.addons
*** postgresql/src/interfaces/ecpg/preproc/ecpg.addons	2012-03-23 20:14:03.822566368 +0100
--- postgresql.1/src/interfaces/ecpg/preproc/ecpg.addons	2012-03-23 20:24:19.657804555 +0100
*************** ECPG: stmtClosePortalStmt block
*** 15,24 ****
  			}
  		}
  
! 		if (current_cursor_readahead)
! 			output_close_statement($1, 0, ECPGst_normal);
! 		else
! 			output_statement($1, 0, ECPGst_normal);
  	}
  ECPG: stmtDeallocateStmt block
  	{
--- 15,21 ----
  			}
  		}
  
! 		output_close_statement($1, 0, ECPGst_normal);
  	}
  ECPG: stmtDeallocateStmt block
  	{
*************** ECPG: stmtDeclareCursorStmt block
*** 29,40 ****
  ECPG: stmtDiscardStmt block
  	{ output_statement($1, 1, ECPGst_normal); }
  ECPG: stmtFetchStmt block
! 	{
! 		if (current_cursor_readahead)
! 			output_fetch_statement($1, 1, ECPGst_normal);
! 		else
! 			output_statement($1, 1, ECPGst_normal);
! 	}
  ECPG: stmtInsertStmt block
  ECPG: stmtSelectStmt block
  	{ output_statement($1, 1, ECPGst_prepnormal); }
--- 26,32 ----
  ECPG: stmtDiscardStmt block
  	{ output_statement($1, 1, ECPGst_normal); }
  ECPG: stmtFetchStmt block
! 	{ output_fetch_statement($1, 1, ECPGst_normal); }
  ECPG: stmtInsertStmt block
  ECPG: stmtSelectStmt block
  	{ output_statement($1, 1, ECPGst_prepnormal); }
*************** ECPG: stmtViewStmt rule
*** 230,241 ****
  		if ((ptr = add_additional_variables($1, true)) != NULL)
  		{
  			connection = ptr->connection ? mm_strdup(ptr->connection) : NULL;
! 			if (current_cursor_readahead)
! 				output_open_statement(mm_strdup(ptr->command),
  							ptr->fetch_readahead,
  							0, ECPGst_normal);
- 			else
- 				output_statement(mm_strdup(ptr->command), 0, ECPGst_normal);
  			ptr->opened = true;
  		}
  	}
--- 222,230 ----
  		if ((ptr = add_additional_variables($1, true)) != NULL)
  		{
  			connection = ptr->connection ? mm_strdup(ptr->connection) : NULL;
! 			output_open_statement(mm_strdup(ptr->command),
  							ptr->fetch_readahead,
  							0, ECPGst_normal);
  			ptr->opened = true;
  		}
  	}
*************** ECPG: var_valueNumericOnly addon
*** 323,329 ****
  		}
  ECPG: fetch_argscursor_name addon
  		add_additional_variables($1, false);
- 		set_cursor_readahead($1);
  		if ($1[0] == ':')
  		{
  			free($1);
--- 312,317 ----
*************** ECPG: fetch_argscursor_name addon
*** 333,339 ****
  		current_cursor_amount = mm_strdup("1");
  ECPG: fetch_argsfrom_incursor_name addon
  		add_additional_variables($2, false);
- 		set_cursor_readahead($2);
  		if ($2[0] == ':')
  		{
  			free($2);
--- 321,326 ----
*************** ECPG: fetch_argsfrom_incursor_name addon
*** 343,349 ****
  		current_cursor_amount = mm_strdup("1");
  ECPG: fetch_argsNEXTopt_from_incursor_name addon
  		add_additional_variables($3, false);
- 		set_cursor_readahead($3);
  		if ($3[0] == ':')
  		{
  			free($3);
--- 330,335 ----
*************** ECPG: fetch_argsNEXTopt_from_incursor_na
*** 353,359 ****
  		current_cursor_amount = mm_strdup("1");
  ECPG: fetch_argsPRIORopt_from_incursor_name addon
  		add_additional_variables($3, false);
- 		set_cursor_readahead($3);
  		if ($3[0] == ':')
  		{
  			free($3);
--- 339,344 ----
*************** ECPG: fetch_argsPRIORopt_from_incursor_n
*** 363,369 ****
  		current_cursor_amount = mm_strdup("1"); 
  ECPG: fetch_argsFIRST_Popt_from_incursor_name addon
  		add_additional_variables($3, false);
- 		set_cursor_readahead($3);
  		if ($3[0] == ':')
  		{
  			free($3);
--- 348,353 ----
*************** ECPG: fetch_argsFIRST_Popt_from_incursor
*** 373,379 ****
  		current_cursor_amount = mm_strdup("1");
  ECPG: fetch_argsLAST_Popt_from_incursor_name addon
  		add_additional_variables($3, false);
- 		set_cursor_readahead($3);
  		if ($3[0] == ':')
  		{
  			free($3);
--- 357,362 ----
*************** ECPG: fetch_argsLAST_Popt_from_incursor_
*** 383,389 ****
  		current_cursor_amount = mm_strdup("-1");
  ECPG: fetch_argsALLopt_from_incursor_name addon
  		add_additional_variables($3, false);
- 		set_cursor_readahead($3);
  		if ($3[0] == ':')
  		{
  			free($3);
--- 366,371 ----
*************** ECPG: fetch_argsALLopt_from_incursor_nam
*** 393,399 ****
  		current_cursor_amount = mm_strdup("all");
  ECPG: fetch_argsSignedIconstopt_from_incursor_name addon
  		add_additional_variables($3, false);
- 		set_cursor_readahead($3);
  		if ($3[0] == ':')
  		{
  			free($3);
--- 375,380 ----
*************** ECPG: fetch_argsSignedIconstopt_from_inc
*** 408,414 ****
  		current_cursor_amount = mm_strdup($1);
  ECPG: fetch_argsFORWARDALLopt_from_incursor_name addon
  		add_additional_variables($4, false);
- 		set_cursor_readahead($4);
  		if ($4[0] == ':')
  		{
  			free($4);
--- 389,394 ----
*************** ECPG: fetch_argsFORWARDALLopt_from_incur
*** 418,424 ****
  		current_cursor_amount = mm_strdup("all");
  ECPG: fetch_argsBACKWARDALLopt_from_incursor_name addon
  		add_additional_variables($4, false);
- 		set_cursor_readahead($4);
  		if ($4[0] == ':')
  		{
  			free($4);
--- 398,403 ----
*************** ECPG: fetch_argsBACKWARDALLopt_from_incu
*** 428,434 ****
  		current_cursor_amount = mm_strdup("all");
  ECPG: fetch_argsABSOLUTE_PSignedIconstopt_from_incursor_name addon
  		add_additional_variables($4, false);
- 		set_cursor_readahead($4);
  		if ($4[0] == ':')
  		{
  			free($4);
--- 407,412 ----
*************** ECPG: fetch_argsABSOLUTE_PSignedIconstop
*** 443,449 ****
  		current_cursor_amount = mm_strdup($2);
  ECPG: fetch_argsRELATIVE_PSignedIconstopt_from_incursor_name addon
  		add_additional_variables($4, false);
- 		set_cursor_readahead($4);
  		if ($4[0] == ':')
  		{
  			free($4);
--- 421,426 ----
*************** ECPG: fetch_argsRELATIVE_PSignedIconstop
*** 458,464 ****
  		current_cursor_amount = mm_strdup($2);
  ECPG: fetch_argsFORWARDSignedIconstopt_from_incursor_name addon
  		add_additional_variables($4, false);
- 		set_cursor_readahead($4);
  		if ($4[0] == ':')
  		{
  			free($4);
--- 435,440 ----
*************** ECPG: fetch_argsFORWARDSignedIconstopt_f
*** 473,479 ****
  		current_cursor_amount = mm_strdup($2);
  ECPG: fetch_argsBACKWARDSignedIconstopt_from_incursor_name addon
  		add_additional_variables($4, false);
- 		set_cursor_readahead($4);
  		if ($4[0] == ':')
  		{
  			free($4);
--- 449,454 ----
*************** ECPG: DeclareCursorStmtDECLAREcursor_nam
*** 571,579 ****
  ECPG: ClosePortalStmtCLOSEcursor_name block
  	{
  		char *cursor_marker = $2[0] == ':' ? mm_strdup("$0") : $2;
- 		if (!(INFORMIX_MODE &&
- 				pg_strcasecmp($2, "database") == 0))
- 			set_cursor_readahead($2);
  		$$ = cat2_str(mm_strdup("close"), cursor_marker);
  	}
  ECPG: opt_hold block
--- 546,551 ----
*************** ECPG: FetchStmtMOVEfetch_args rule
*** 649,655 ****
  	{
  		char *cursor_marker = $3[0] == ':' ? mm_strdup("$0") : $3;
  		add_additional_variables($3, false);
- 		set_cursor_readahead($3);
  		current_cursor_direction = ECPGc_forward;
  		current_cursor_amount = mm_strdup("1");
  		$$ = cat_str(2, mm_strdup("fetch forward"), cursor_marker);
--- 621,626 ----
*************** ECPG: FetchStmtMOVEfetch_args rule
*** 658,664 ****
  	{
  		char *cursor_marker = $4[0] == ':' ? mm_strdup("$0") : $4;
  		add_additional_variables($4, false);
- 		set_cursor_readahead($4);
  		current_cursor_direction = ECPGc_forward;
  		current_cursor_amount = mm_strdup("1");
  		$$ = cat_str(2, mm_strdup("fetch forward from"), cursor_marker);
--- 629,634 ----
*************** ECPG: FetchStmtMOVEfetch_args rule
*** 667,673 ****
  	{
  		char *cursor_marker = $3[0] == ':' ? mm_strdup("$0") : $3;
  		add_additional_variables($3, false);
- 		set_cursor_readahead($3);
  		current_cursor_direction = ECPGc_backward;
  		current_cursor_amount = mm_strdup("1");
  		$$ = cat_str(2, mm_strdup("fetch backward"), cursor_marker);
--- 637,642 ----
*************** ECPG: FetchStmtMOVEfetch_args rule
*** 676,682 ****
  	{
  		char *cursor_marker = $4[0] == ':' ? mm_strdup("$0") : $4;
  		add_additional_variables($4, false);
- 		set_cursor_readahead($4);
  		current_cursor_direction = ECPGc_backward;
  		current_cursor_amount = mm_strdup("1");
  		$$ = cat_str(2, mm_strdup("fetch backward from"), cursor_marker);
--- 645,650 ----
*************** ECPG: FetchStmtMOVEfetch_args rule
*** 685,691 ****
  	{
  		char *cursor_marker = $3[0] == ':' ? mm_strdup("$0") : $3;
  		add_additional_variables($3, false);
- 		set_cursor_readahead($3);
  		current_cursor_direction = ECPGc_forward;
  		current_cursor_amount = mm_strdup("1");
  		$$ = cat_str(2, mm_strdup("move forward"), cursor_marker);
--- 653,658 ----
*************** ECPG: FetchStmtMOVEfetch_args rule
*** 694,700 ****
  	{
  		char *cursor_marker = $4[0] == ':' ? mm_strdup("$0") : $4;
  		add_additional_variables($4, false);
- 		set_cursor_readahead($4);
  		current_cursor_direction = ECPGc_forward;
  		current_cursor_amount = mm_strdup("1");
  		$$ = cat_str(2, mm_strdup("move forward from"), cursor_marker);
--- 661,666 ----
*************** ECPG: FetchStmtMOVEfetch_args rule
*** 703,709 ****
  	{
  		char *cursor_marker = $3[0] == ':' ? mm_strdup("$0") : $3;
  		add_additional_variables($3, false);
- 		set_cursor_readahead($3);
  		current_cursor_direction = ECPGc_backward;
  		current_cursor_amount = mm_strdup("1");
  		$$ = cat_str(2, mm_strdup("move backward"), cursor_marker);
--- 669,674 ----
*************** ECPG: FetchStmtMOVEfetch_args rule
*** 712,718 ****
  	{
  		char *cursor_marker = $4[0] == ':' ? mm_strdup("$0") : $4;
  		add_additional_variables($4, false);
- 		set_cursor_readahead($4);
  		current_cursor_direction = ECPGc_backward;
  		current_cursor_amount = mm_strdup("1");
  		$$ = cat_str(2, mm_strdup("move backward from"), cursor_marker);
--- 677,682 ----
diff -dcrpN postgresql/src/interfaces/ecpg/preproc/ecpg.header postgresql.1/src/interfaces/ecpg/preproc/ecpg.header
*** postgresql/src/interfaces/ecpg/preproc/ecpg.header	2012-03-23 20:19:06.976158136 +0100
--- postgresql.1/src/interfaces/ecpg/preproc/ecpg.header	2012-03-23 20:22:21.553182151 +0100
*************** int struct_level = 0;
*** 36,42 ****
  int braces_open; /* brace level counter */
  char *current_function;
  char *current_cursor = NULL;
- long current_cursor_readahead = 0;
  enum ECPGttype current_cursor_vartype;
  enum ECPG_cursor_direction current_cursor_direction;
  bool current_cursor_scroll;
--- 36,41 ----
*************** get_cursor(const char *curname)
*** 156,172 ****
  }
  
  /*
-  * Set current_cursor_readahead based on the current cursor.
-  * Doesn't return if the cursor is not declared.
-  */
- static void
- set_cursor_readahead(const char *curname)
- {
- 	struct cursor *ptr = get_cursor(curname);
- 	current_cursor_readahead = ptr->fetch_readahead;
- }
- 
- /*
   * string concatenation
   */
  
--- 155,160 ----
diff -dcrpN postgresql/src/interfaces/ecpg/preproc/ecpg.trailer postgresql.1/src/interfaces/ecpg/preproc/ecpg.trailer
*** postgresql/src/interfaces/ecpg/preproc/ecpg.trailer	2012-03-23 20:19:54.040405661 +0100
--- postgresql.1/src/interfaces/ecpg/preproc/ecpg.trailer	2012-03-23 20:23:27.313528623 +0100
*************** ECPGFree:	SQL_FREE cursor_name	{ $$ = $2
*** 1012,1018 ****
   */
  ECPGOpen: SQL_OPEN cursor_name opt_ecpg_using
  		{
- 			set_cursor_readahead($2);
  			if ($2[0] == ':')
  				remove_variable_from_list(&argsinsert, find_variable($2 + 1));
  			$$ = $2;
--- 1012,1017 ----
diff -dcrpN postgresql/src/interfaces/ecpg/preproc/extern.h postgresql.1/src/interfaces/ecpg/preproc/extern.h
*** postgresql/src/interfaces/ecpg/preproc/extern.h	2012-03-23 20:16:44.991412049 +0100
--- postgresql.1/src/interfaces/ecpg/preproc/extern.h	2012-03-23 20:22:37.025263613 +0100
*************** extern int	braces_open,
*** 34,40 ****
  extern char *current_function;
  extern char *current_cursor;  
  extern enum ECPGttype current_cursor_vartype;
- extern long current_cursor_readahead;
  extern enum ECPG_cursor_direction current_cursor_direction;
  extern char *current_cursor_amount;
  extern char *descriptor_index;
--- 34,39 ----
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/compat_informix-sqlda.c postgresql.1/src/interfaces/ecpg/test/expected/compat_informix-sqlda.c
*** postgresql/src/interfaces/ecpg/test/expected/compat_informix-sqlda.c	2012-03-23 18:25:28.543140533 +0100
--- postgresql.1/src/interfaces/ecpg/test/expected/compat_informix-sqlda.c	2012-03-23 20:26:42.000000000 +0100
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 241,247 ****
  
  
  	strcpy(msg, "open");
! 	{ ECPGdo(__LINE__, 1, 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 101 "sqlda.pgc"
--- 241,247 ----
  
  
  	strcpy(msg, "open");
! 	{ ECPGopen(__LINE__, 1, 1, NULL, 0, 0, 0, 0, 0, "mycur1", 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 101 "sqlda.pgc"
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 258,264 ****
  	while (1)
  	{
  		strcpy(msg, "fetch");
! 		{ ECPGdo(__LINE__, 1, 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 109 "sqlda.pgc"
--- 258,264 ----
  	while (1)
  	{
  		strcpy(msg, "fetch");
! 		{ ECPGfetch(__LINE__, 1, 1, NULL, 0, "mycur1", ECPGc_forward, "1", 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 109 "sqlda.pgc"
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 279,285 ****
  
  
  	strcpy(msg, "close");
! 	{ ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "close mycur1", ECPGt_EOIT, ECPGt_EORT);
  #line 118 "sqlda.pgc"
  
  if (sqlca.sqlcode < 0) exit (1);}
--- 279,285 ----
  
  
  	strcpy(msg, "close");
! 	{ ECPGclose(__LINE__, 1, 1, NULL, 0, "mycur1", ECPGst_normal, "close mycur1", ECPGt_EOIT, ECPGt_EORT);
  #line 118 "sqlda.pgc"
  
  if (sqlca.sqlcode < 0) exit (1);}
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 316,322 ****
  
  
  	strcpy(msg, "open");
! 	{ ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "declare mycur2 cursor for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "st_id2", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 138 "sqlda.pgc"
--- 316,322 ----
  
  
  	strcpy(msg, "open");
! 	{ ECPGopen(__LINE__, 1, 1, NULL, 0, 0, 0, 0, 0, "mycur2", ECPGst_normal, "declare mycur2 cursor for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "st_id2", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 138 "sqlda.pgc"
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 333,339 ****
  	while (1)
  	{
  		strcpy(msg, "fetch");
! 		{ ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "fetch from mycur2", ECPGt_EOIT, 
  	ECPGt_sqlda, &outp_sqlda, 0L, 0L, 0L, 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
  #line 146 "sqlda.pgc"
--- 333,339 ----
  	while (1)
  	{
  		strcpy(msg, "fetch");
! 		{ ECPGfetch(__LINE__, 1, 1, NULL, 0, "mycur2", ECPGc_forward, "1", ECPGst_normal, "fetch from mycur2", ECPGt_EOIT, 
  	ECPGt_sqlda, &outp_sqlda, 0L, 0L, 0L, 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
  #line 146 "sqlda.pgc"
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 354,360 ****
  
  
  	strcpy(msg, "close");
! 	{ ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "close mycur2", ECPGt_EOIT, ECPGt_EORT);
  #line 155 "sqlda.pgc"
  
  if (sqlca.sqlcode < 0) exit (1);}
--- 354,360 ----
  
  
  	strcpy(msg, "close");
! 	{ ECPGclose(__LINE__, 1, 1, NULL, 0, "mycur2", ECPGst_normal, "close mycur2", ECPGt_EOIT, ECPGt_EORT);
  #line 155 "sqlda.pgc"
  
  if (sqlca.sqlcode < 0) exit (1);}
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/compat_informix-sqlda.stderr postgresql.1/src/interfaces/ecpg/test/expected/compat_informix-sqlda.stderr
*** postgresql/src/interfaces/ecpg/test/expected/compat_informix-sqlda.stderr	2010-09-21 13:50:00.000000000 +0200
--- postgresql.1/src/interfaces/ecpg/test/expected/compat_informix-sqlda.stderr	2012-03-23 20:26:42.000000000 +0100
***************
*** 30,38 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 101: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 109: 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 109: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 109: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 30,54 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 101: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 109: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 from mycur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 109: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 from mycur1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 109: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 109: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 109: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 109: query: move absolute 0 in mycur1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 109: query: fetch forward 1 from mycur1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 109: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 109: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 109: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 109: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 62,70 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 109: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 109: 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 109: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 109: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 78,102 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 109: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 109: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 from mycur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 109: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 from mycur1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 109: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 109: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 109: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 109: query: move absolute 1 in mycur1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 109: query: fetch forward 1 from mycur1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 109: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 109: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 109: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 109: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 86,94 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 109: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 109: 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 109: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 109: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 118,142 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 109: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 109: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 from mycur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 109: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 from mycur1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 109: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 109: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 109: start_pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 109: query: move absolute 2 in mycur1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 109: query: fetch forward 1 from mycur1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 109: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 109: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 109: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 109: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 118,128 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 109: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 109: 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 109: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 109: correctly got 0 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 109: no data found on line 109
  [NO_PID]: sqlca: code: 100, state: 02000
--- 166,190 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 109: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 109: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 from mycur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 109: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 from mycur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 109: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 109: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 109: start_pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 109: query: move absolute 3 in mycur1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 109: query: fetch forward 1 from mycur1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 109: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 109: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 109: setting atend to true (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 109: no data found on line 109
  [NO_PID]: sqlca: code: 100, state: 02000
***************
*** 142,150 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 138: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 146: query: fetch from mycur2; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 146: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 146: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 204,228 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 138: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 146: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from mycur2
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 146: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from mycur2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 146: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 146: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 146: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 146: query: move absolute 0 in mycur2; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 146: query: fetch forward 1 from mycur2; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 146: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 146: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 146: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 146: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 174,182 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 146: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 146: query: fetch from mycur2; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 146: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 146: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 252,276 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 146: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 146: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from mycur2
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 146: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from mycur2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 146: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 146: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 146: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 146: query: move absolute 1 in mycur2; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 146: query: fetch forward 1 from mycur2; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 146: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 146: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 146: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 146: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 198,206 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 146: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 146: query: fetch from mycur2; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 146: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 146: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 292,316 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 146: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 146: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from mycur2
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 146: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from mycur2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 146: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 146: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 146: start_pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 146: query: move absolute 2 in mycur2; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 146: query: fetch forward 1 from mycur2; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 146: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 146: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 146: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 146: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 230,240 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 146: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 146: query: fetch from mycur2; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 146: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 146: correctly got 0 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 146: no data found on line 146
  [NO_PID]: sqlca: code: 100, state: 02000
--- 340,364 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 146: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 146: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from mycur2
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 146: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from mycur2
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 146: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 146: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 146: start_pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 146: query: move absolute 3 in mycur2; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 146: query: fetch forward 1 from mycur2; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 146: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 146: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 146: setting atend to true (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 146: no data found on line 146
  [NO_PID]: sqlca: code: 100, state: 02000
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c postgresql.1/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c
*** postgresql/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c	2012-03-23 18:25:28.544140539 +0100
--- postgresql.1/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c	2012-03-23 20:26:42.000000000 +0100
*************** if (sqlca.sqlcode < 0) dosqlprint ( );}
*** 158,164 ****
  
  	while (1)
  	{
! 		{ ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "fetch forward c", ECPGt_EOIT, 
  	ECPGt_int,&(i),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_decimal,&(j),(long)1,(long)1,sizeof(decimal), 
--- 158,164 ----
  
  	while (1)
  	{
! 		{ ECPGfetch(__LINE__, 1, 1, NULL, 0, "c", ECPGc_forward, "1", ECPGst_normal, "fetch forward c", ECPGt_EOIT, 
  	ECPGt_int,&(i),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_decimal,&(j),(long)1,(long)1,sizeof(decimal), 
*************** if (sqlca.sqlcode < 0) dosqlprint ( );}
*** 244,250 ****
  
  static void openit(void)
  {
! 	{ ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "declare c cursor for select * from test where i <= $1 ", 
  	ECPGt_int,&(*( int  *)(ECPGget_var( 0))),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 95 "test_informix.pgc"
--- 244,250 ----
  
  static void openit(void)
  {
! 	{ ECPGopen(__LINE__, 1, 1, NULL, 0, 0, 0, 0, 0, "c", ECPGst_normal, "declare c cursor for select * from test where i <= $1 ", 
  	ECPGt_int,&(*( int  *)(ECPGget_var( 0))),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 95 "test_informix.pgc"
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/compat_informix-test_informix.stderr postgresql.1/src/interfaces/ecpg/test/expected/compat_informix-test_informix.stderr
*** postgresql/src/interfaces/ecpg/test/expected/compat_informix-test_informix.stderr	2010-09-21 13:50:00.000000000 +0200
--- postgresql.1/src/interfaces/ecpg/test/expected/compat_informix-test_informix.stderr	2012-03-23 20:26:43.000000000 +0100
*************** DETAIL:  Key (i)=(7) already exists.
*** 63,71 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 95: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 57: query: fetch forward c; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 57: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 57: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 63,87 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 95: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 57: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch forward c
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 57: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch forward c
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 57: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 57: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 57: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 57: query: move absolute 0 in c; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 57: query: fetch forward 1 from c; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 57: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 57: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 57: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 57: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
*************** DETAIL:  Key (i)=(7) already exists.
*** 75,83 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 57: RESULT: test    offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 57: query: fetch forward c; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 57: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 57: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 91,115 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 57: RESULT: test    offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 57: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch forward c
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 57: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch forward c
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 57: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 57: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 57: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 57: query: move absolute 1 in c; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 57: query: fetch forward 1 from c; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 57: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 57: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 57: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 57: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
*************** DETAIL:  Key (i)=(7) already exists.
*** 87,97 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 57: RESULT: a       offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 57: query: fetch forward c; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 57: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 57: correctly got 0 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 57: no data found on line 57
  [NO_PID]: sqlca: code: 100, state: 02000
--- 119,143 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 57: RESULT: a       offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 57: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch forward c
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 57: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch forward c
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 57: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 57: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 57: start_pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 57: query: move absolute 2 in c; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 57: query: fetch forward 1 from c; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 57: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 57: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 57: setting atend to true (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 57: no data found on line 57
  [NO_PID]: sqlca: code: 100, state: 02000
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c postgresql.1/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c
*** postgresql/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c	2012-03-23 18:25:28.544140539 +0100
--- postgresql.1/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c	2012-03-23 20:26:43.000000000 +0100
*************** if (sqlca.sqlcode < 0) sqlprint ( );}
*** 82,88 ****
  	/* declare cur cursor for select id , d , d from nantest1 */
  #line 33 "nan_test.pgc"
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare cur cursor for select id , d , d from nantest1", ECPGt_EOIT, ECPGt_EORT);
  #line 34 "nan_test.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint ( );}
--- 82,88 ----
  	/* declare cur cursor for select id , d , d from nantest1 */
  #line 33 "nan_test.pgc"
  
! 	{ ECPGopen(__LINE__, 0, 1, NULL, 0, 0, 0, 0, 0, "cur", ECPGst_normal, "declare cur cursor for select id , d , d from nantest1", ECPGt_EOIT, ECPGt_EORT);
  #line 34 "nan_test.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint ( );}
*************** if (sqlca.sqlcode < 0) sqlprint ( );}
*** 90,96 ****
  
  	while (1)
  	{
! 		{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch from cur", ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_double,&(d),(long)1,(long)1,sizeof(double), 
--- 90,96 ----
  
  	while (1)
  	{
! 		{ ECPGfetch(__LINE__, 0, 1, NULL, 0, "cur", ECPGc_forward, "1", ECPGst_normal, "fetch from cur", ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_double,&(d),(long)1,(long)1,sizeof(double), 
*************** if (sqlca.sqlcode < 0) sqlprint ( );}
*** 130,143 ****
  #line 46 "nan_test.pgc"
  
  	}
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close cur", ECPGt_EOIT, ECPGt_EORT);
  #line 48 "nan_test.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint ( );}
  #line 48 "nan_test.pgc"
  
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare cur cursor for select id , d , d from nantest1", ECPGt_EOIT, ECPGt_EORT);
  #line 50 "nan_test.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint ( );}
--- 130,143 ----
  #line 46 "nan_test.pgc"
  
  	}
! 	{ ECPGclose(__LINE__, 0, 1, NULL, 0, "cur", ECPGst_normal, "close cur", ECPGt_EOIT, ECPGt_EORT);
  #line 48 "nan_test.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint ( );}
  #line 48 "nan_test.pgc"
  
  
! 	{ ECPGopen(__LINE__, 0, 1, NULL, 0, 0, 0, 0, 0, "cur", ECPGst_normal, "declare cur cursor for select id , d , d from nantest1", ECPGt_EOIT, ECPGt_EORT);
  #line 50 "nan_test.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint ( );}
*************** if (sqlca.sqlcode < 0) sqlprint ( );}
*** 145,151 ****
  
  	while (1)
  	{
! 		{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch from cur", ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_double,&(d),(long)1,(long)1,sizeof(double), 
--- 145,151 ----
  
  	while (1)
  	{
! 		{ ECPGfetch(__LINE__, 0, 1, NULL, 0, "cur", ECPGc_forward, "1", ECPGst_normal, "fetch from cur", ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_double,&(d),(long)1,(long)1,sizeof(double), 
*************** if (sqlca.sqlcode < 0) sqlprint ( );}
*** 164,170 ****
  		if (isnan(d))
  			printf("%d  NaN '%s'\n", id, val);
  	}
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close cur", ECPGt_EOIT, ECPGt_EORT);
  #line 61 "nan_test.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint ( );}
--- 164,170 ----
  		if (isnan(d))
  			printf("%d  NaN '%s'\n", id, val);
  	}
! 	{ ECPGclose(__LINE__, 0, 1, NULL, 0, "cur", ECPGst_normal, "close cur", ECPGt_EOIT, ECPGt_EORT);
  #line 61 "nan_test.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint ( );}
*************** if (sqlca.sqlcode < 0) sqlprint ( );}
*** 221,227 ****
  	/* declare cur1 cursor for select id , d , d from nantest2 */
  #line 75 "nan_test.pgc"
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare cur1 cursor for select id , d , d from nantest2", ECPGt_EOIT, ECPGt_EORT);
  #line 76 "nan_test.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint ( );}
--- 221,227 ----
  	/* declare cur1 cursor for select id , d , d from nantest2 */
  #line 75 "nan_test.pgc"
  
! 	{ ECPGopen(__LINE__, 0, 1, NULL, 0, 0, 0, 0, 0, "cur1", ECPGst_normal, "declare cur1 cursor for select id , d , d from nantest2", ECPGt_EOIT, ECPGt_EORT);
  #line 76 "nan_test.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint ( );}
*************** if (sqlca.sqlcode < 0) sqlprint ( );}
*** 229,235 ****
  
  	while (1)
  	{
! 		{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch from cur1", ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_numeric,&(num),(long)1,(long)0,sizeof(numeric), 
--- 229,235 ----
  
  	while (1)
  	{
! 		{ ECPGfetch(__LINE__, 0, 1, NULL, 0, "cur1", ECPGc_forward, "1", ECPGst_normal, "fetch from cur1", ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_numeric,&(num),(long)1,(long)0,sizeof(numeric), 
*************** if (sqlca.sqlcode < 0) sqlprint ( );}
*** 245,251 ****
  			break;
  		printf("%d %s '%s'\n", id, (num->sign == NUMERIC_NAN ? "NaN" : "not NaN"), val);
  	}
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close cur1", ECPGt_EOIT, ECPGt_EORT);
  #line 84 "nan_test.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint ( );}
--- 245,251 ----
  			break;
  		printf("%d %s '%s'\n", id, (num->sign == NUMERIC_NAN ? "NaN" : "not NaN"), val);
  	}
! 	{ ECPGclose(__LINE__, 0, 1, NULL, 0, "cur1", ECPGst_normal, "close cur1", ECPGt_EOIT, ECPGt_EORT);
  #line 84 "nan_test.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint ( );}
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stderr postgresql.1/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stderr
*** postgresql/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stderr	2010-09-21 13:50:00.000000000 +0200
--- postgresql.1/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stderr	2012-03-23 20:26:43.000000000 +0100
***************
*** 20,28 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 34: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 37: query: fetch from cur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 37: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 37: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 20,44 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 34: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 37: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 37: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from cur
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 37: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 37: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 37: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 37: query: move absolute 0 in cur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 37: query: fetch forward 1 from cur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 37: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 37: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 37: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 37: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 52,60 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 46: OK: INSERT 0 1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 37: query: fetch from cur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 37: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 37: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 68,92 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 46: OK: INSERT 0 1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 37: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 37: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from cur
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 37: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 37: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 37: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 37: query: move absolute 1 in cur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 37: query: fetch forward 1 from cur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 37: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 37: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 37: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 37: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 84,92 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 46: OK: INSERT 0 1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 37: query: fetch from cur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 37: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 37: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 116,140 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 46: OK: INSERT 0 1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 37: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 37: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from cur
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 37: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 37: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 37: start_pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 37: query: move absolute 2 in cur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 37: query: fetch forward 1 from cur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 37: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 37: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 37: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 37: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 116,126 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 46: OK: INSERT 0 1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 37: query: fetch from cur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 37: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 37: correctly got 0 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 37: no data found on line 37
  [NO_PID]: sqlca: code: 100, state: 02000
--- 164,188 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 46: OK: INSERT 0 1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 37: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 37: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 37: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 37: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 37: start_pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 37: query: move absolute 3 in cur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 37: query: fetch forward 1 from cur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 37: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 37: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 37: setting atend to true (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 37: no data found on line 37
  [NO_PID]: sqlca: code: 100, state: 02000
***************
*** 136,144 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 50: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: query: fetch from cur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 198,222 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 50: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from cur
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 0 in cur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from cur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 148,156 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: NaN offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: query: fetch from cur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 226,250 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: NaN offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from cur
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 1 in cur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from cur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 160,168 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: Infinity offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: query: fetch from cur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 254,278 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: Infinity offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from cur
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: start_pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 2 in cur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from cur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 172,180 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: -Infinity offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: query: fetch from cur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 282,306 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: -Infinity offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from cur
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: start_pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 3 in cur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from cur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 184,192 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: NaN offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: query: fetch from cur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 310,334 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: NaN offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from cur
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 5
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: start_pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 4 in cur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from cur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 5
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 196,204 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: NaN offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: query: fetch from cur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 338,362 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: NaN offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from cur
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 6
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: start_pos 5
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 5 in cur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from cur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 6
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 208,216 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: Infinity offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: query: fetch from cur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 366,390 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: Infinity offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from cur
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 7
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: start_pos 6
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 6 in cur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from cur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 7
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 220,228 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: Infinity offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: query: fetch from cur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 394,418 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: Infinity offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from cur
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 8
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: start_pos 7
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 7 in cur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from cur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 8
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 232,240 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: -Infinity offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: query: fetch from cur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 422,446 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: -Infinity offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from cur
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 9
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: start_pos 8
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 8 in cur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from cur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 9
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 244,254 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: -Infinity offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: query: fetch from cur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: correctly got 0 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 53: no data found on line 53
  [NO_PID]: sqlca: code: 100, state: 02000
--- 450,474 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: -Infinity offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 10
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: start_pos 9
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 9 in cur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from cur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 10
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: setting atend to true (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 53: no data found on line 53
  [NO_PID]: sqlca: code: 100, state: 02000
***************
*** 304,312 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 76: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 79: query: fetch from cur1; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 79: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 79: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 524,548 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 76: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 79: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from cur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 79: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from cur1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 79: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 79: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 79: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 79: query: move absolute 0 in cur1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 79: query: fetch forward 1 from cur1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 79: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 79: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 79: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 79: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 316,324 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 79: RESULT: NaN offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 79: query: fetch from cur1; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 79: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 79: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 552,576 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 79: RESULT: NaN offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 79: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from cur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 79: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from cur1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 79: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 79: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 79: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 79: query: move absolute 1 in cur1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 79: query: fetch forward 1 from cur1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 79: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 79: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 79: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 79: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 328,336 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 79: RESULT: NaN offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 79: query: fetch from cur1; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 79: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 79: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 580,604 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 79: RESULT: NaN offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 79: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from cur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 79: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from cur1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 79: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 79: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 79: start_pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 79: query: move absolute 2 in cur1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 79: query: fetch forward 1 from cur1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 79: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 79: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 79: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 79: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 340,350 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 79: RESULT: NaN offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 79: query: fetch from cur1; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 79: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 79: correctly got 0 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 79: no data found on line 79
  [NO_PID]: sqlca: code: 100, state: 02000
--- 608,632 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 79: RESULT: NaN offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 79: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from cur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 79: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from cur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 79: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 79: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 79: start_pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 79: query: move absolute 3 in cur1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 79: query: fetch forward 1 from cur1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 79: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 79: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 79: setting atend to true (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 79: no data found on line 79
  [NO_PID]: sqlca: code: 100, state: 02000
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/preproc-autoprep.c postgresql.1/src/interfaces/ecpg/test/expected/preproc-autoprep.c
*** postgresql/src/interfaces/ecpg/test/expected/preproc-autoprep.c	2010-09-21 13:50:00.000000000 +0200
--- postgresql.1/src/interfaces/ecpg/test/expected/preproc-autoprep.c	2012-03-23 20:26:43.000000000 +0100
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 133,139 ****
  #line 35 "autoprep.pgc"
  
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare C cursor for select Item1 from T", ECPGt_EOIT, ECPGt_EORT);
  #line 37 "autoprep.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
--- 133,139 ----
  #line 35 "autoprep.pgc"
  
  
!   { ECPGopen(__LINE__, 0, 1, NULL, 0, 0, 0, 0, 0, "C", ECPGst_normal, "declare C cursor for select Item1 from T", ECPGt_EOIT, ECPGt_EORT);
  #line 37 "autoprep.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 143,149 ****
  #line 37 "autoprep.pgc"
  
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch 1 in C", ECPGt_EOIT, 
  	ECPGt_int,&(i),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
  #line 39 "autoprep.pgc"
--- 143,149 ----
  #line 37 "autoprep.pgc"
  
  
!   { ECPGfetch(__LINE__, 0, 1, NULL, 0, "C", ECPGc_forward, "1", ECPGst_normal, "fetch 1 in C", ECPGt_EOIT, 
  	ECPGt_int,&(i),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
  #line 39 "autoprep.pgc"
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 156,162 ****
  
    printf("i = %d\n", i);
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close C", ECPGt_EOIT, ECPGt_EORT);
  #line 42 "autoprep.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
--- 156,162 ----
  
    printf("i = %d\n", i);
  
!   { ECPGclose(__LINE__, 0, 1, NULL, 0, "C", ECPGst_normal, "close C", ECPGt_EOIT, ECPGt_EORT);
  #line 42 "autoprep.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 180,186 ****
  #line 46 "autoprep.pgc"
  
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare cur1 cursor for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "stmt1", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 48 "autoprep.pgc"
--- 180,186 ----
  #line 46 "autoprep.pgc"
  
  
!   { ECPGopen(__LINE__, 0, 1, NULL, 0, 0, 0, 0, 0, "cur1", ECPGst_normal, "declare cur1 cursor for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "stmt1", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 48 "autoprep.pgc"
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 199,205 ****
    i = 0;
    while (1)
    {
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch cur1", ECPGt_EOIT, 
  	ECPGt_int,&(item1),(long)1,(long)1,sizeof(int), 
  	ECPGt_int,&(ind1),(long)1,(long)1,sizeof(int), ECPGt_EORT);
  #line 55 "autoprep.pgc"
--- 199,205 ----
    i = 0;
    while (1)
    {
! 	{ ECPGfetch(__LINE__, 0, 1, NULL, 0, "cur1", ECPGc_forward, "1", ECPGst_normal, "fetch cur1", ECPGt_EOIT, 
  	ECPGt_int,&(item1),(long)1,(long)1,sizeof(int), 
  	ECPGt_int,&(ind1),(long)1,(long)1,sizeof(int), ECPGt_EORT);
  #line 55 "autoprep.pgc"
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 217,223 ****
  	i++;
    }
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close cur1", ECPGt_EOIT, ECPGt_EORT);
  #line 60 "autoprep.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
--- 217,223 ----
  	i++;
    }
  
!   { ECPGclose(__LINE__, 0, 1, NULL, 0, "cur1", ECPGst_normal, "close cur1", ECPGt_EOIT, ECPGt_EORT);
  #line 60 "autoprep.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/preproc-autoprep.stderr postgresql.1/src/interfaces/ecpg/test/expected/preproc-autoprep.stderr
*** postgresql/src/interfaces/ecpg/test/expected/preproc-autoprep.stderr	2010-09-21 13:50:00.000000000 +0200
--- postgresql.1/src/interfaces/ecpg/test/expected/preproc-autoprep.stderr	2012-03-23 20:26:43.000000000 +0100
***************
*** 72,80 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 37: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 39: query: fetch 1 in C; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 39: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 39: correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 72,96 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 37: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 39: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 in C
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 39: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 in C
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 39: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 39: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 39: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 39: query: move absolute 0 in C; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 39: query: fetch forward 1 from C; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 39: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 39: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 39: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 39: correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 94,136 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 48: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 55: query: fetch cur1; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 55: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 55: correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 55: RESULT: 1 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 55: query: fetch cur1; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 55: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 55: correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 55: RESULT: 2 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 55: query: fetch cur1; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 55: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 55: correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 55: RESULT: 2 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 55: query: fetch cur1; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 55: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 55: correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 55: RESULT:  offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 55: query: fetch cur1; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 55: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 55: correctly got 0 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 55: no data found on line 55
  [NO_PID]: sqlca: code: 100, state: 02000
--- 110,230 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 48: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch cur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch cur1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: query: move absolute 0 in cur1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: query: fetch forward 1 from cur1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 55: correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 55: RESULT: 1 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch cur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch cur1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: query: move absolute 1 in cur1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: query: fetch forward 1 from cur1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 55: correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 55: RESULT: 2 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch cur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch cur1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: start_pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: query: move absolute 2 in cur1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: query: fetch forward 1 from cur1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 55: correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 55: RESULT: 2 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch cur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch cur1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: start_pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: query: move absolute 3 in cur1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: query: fetch forward 1 from cur1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 55: correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 55: RESULT:  offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch cur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch cur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: backward 0 atstart 0 atend 0 pos 5
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: start_pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: query: move absolute 4 in cur1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: query: fetch forward 1 from cur1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: backward 0 atstart 0 atend 0 pos 5
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: setting atend to true (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 55: no data found on line 55
  [NO_PID]: sqlca: code: 100, state: 02000
***************
*** 232,240 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 37: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 39: query: fetch 1 in C; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 39: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 39: correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 326,350 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 37: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 39: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 in C
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 39: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 in C
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 39: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 39: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 39: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 39: query: move absolute 0 in C; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 39: query: fetch forward 1 from C; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 39: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 39: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 39: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 39: correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 254,296 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 48: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 55: query: fetch cur1; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 55: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 55: correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 55: RESULT: 1 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 55: query: fetch cur1; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 55: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 55: correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 55: RESULT: 2 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 55: query: fetch cur1; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 55: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 55: correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 55: RESULT: 2 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 55: query: fetch cur1; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 55: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 55: correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 55: RESULT:  offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 55: query: fetch cur1; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 55: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 55: correctly got 0 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 55: no data found on line 55
  [NO_PID]: sqlca: code: 100, state: 02000
--- 364,484 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 48: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch cur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch cur1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: query: move absolute 0 in cur1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: query: fetch forward 1 from cur1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 55: correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 55: RESULT: 1 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch cur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch cur1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: query: move absolute 1 in cur1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: query: fetch forward 1 from cur1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 55: correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 55: RESULT: 2 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch cur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch cur1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: start_pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: query: move absolute 2 in cur1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: query: fetch forward 1 from cur1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 55: correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 55: RESULT: 2 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch cur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch cur1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: start_pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: query: move absolute 3 in cur1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: query: fetch forward 1 from cur1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 55: correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 55: RESULT:  offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch cur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch cur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 55: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: backward 0 atstart 0 atend 0 pos 5
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: start_pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: query: move absolute 4 in cur1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: query: fetch forward 1 from cur1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 55: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: backward 0 atstart 0 atend 0 pos 5
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 55: setting atend to true (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 55: no data found on line 55
  [NO_PID]: sqlca: code: 100, state: 02000
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/preproc-cursor.c postgresql.1/src/interfaces/ecpg/test/expected/preproc-cursor.c
*** postgresql/src/interfaces/ecpg/test/expected/preproc-cursor.c	2012-03-23 18:25:28.545140545 +0100
--- postgresql.1/src/interfaces/ecpg/test/expected/preproc-cursor.c	2012-03-23 20:26:43.000000000 +0100
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 187,193 ****
  
  
  	strcpy(msg, "open");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "declare $0 cursor for select id , t from t1", 
  	ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 67 "cursor.pgc"
--- 187,193 ----
  
  
  	strcpy(msg, "open");
! 	{ ECPGopen(__LINE__, 0, 1, "test1", 0, 0, 0, 0, 0, curname1, ECPGst_normal, "declare $0 cursor for select id , t from t1", 
  	ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 67 "cursor.pgc"
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 197,203 ****
  
  
  	strcpy(msg, "fetch from");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch forward from $0", 
  	ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
--- 197,203 ----
  
  
  	strcpy(msg, "fetch from");
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname1, ECPGc_forward, "1", ECPGst_normal, "fetch forward from $0", 
  	ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 212,218 ****
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "fetch");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch forward $0", 
  	ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
--- 212,218 ----
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "fetch");
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname1, ECPGc_forward, "1", ECPGst_normal, "fetch forward $0", 
  	ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 227,233 ****
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "fetch 1 from");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch 1 from $0", 
  	ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
--- 227,233 ----
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "fetch 1 from");
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname1, ECPGc_forward, "1", ECPGst_normal, "fetch 1 from $0", 
  	ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 243,249 ****
  
  	strcpy(msg, "fetch :count from");
  	count = 1;
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch $0 from $0", 
  	ECPGt_int,&(count),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char), 
--- 243,249 ----
  
  	strcpy(msg, "fetch :count from");
  	count = 1;
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname1, ECPGc_forward, "$0", ECPGst_normal, "fetch $0 from $0", 
  	ECPGt_int,&(count),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 260,266 ****
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "move in");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "move absolute 0 in $0", 
  	ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 87 "cursor.pgc"
--- 260,266 ----
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "move in");
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname1, ECPGc_absolute, "0", ECPGst_normal, "move absolute 0 in $0", 
  	ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 87 "cursor.pgc"
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 270,276 ****
  
  
  	strcpy(msg, "fetch 1");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch 1 $0", 
  	ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
--- 270,276 ----
  
  
  	strcpy(msg, "fetch 1");
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname1, ECPGc_forward, "1", ECPGst_normal, "fetch 1 $0", 
  	ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 286,292 ****
  
  	strcpy(msg, "fetch :count");
  	count = 1;
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch $0 $0", 
  	ECPGt_int,&(count),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char), 
--- 286,292 ----
  
  	strcpy(msg, "fetch :count");
  	count = 1;
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname1, ECPGc_forward, "$0", ECPGst_normal, "fetch $0 $0", 
  	ECPGt_int,&(count),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 303,309 ****
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "close");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "close $0", 
  	ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 99 "cursor.pgc"
--- 303,309 ----
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "close");
! 	{ ECPGclose(__LINE__, 0, 1, "test1", 0, curname1, ECPGst_normal, "close $0", 
  	ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 99 "cursor.pgc"
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 323,329 ****
  
  
  	strcpy(msg, "open");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "declare $0 cursor for select id , t from t1", 
  	ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
--- 323,329 ----
  
  
  	strcpy(msg, "open");
! 	{ ECPGopen(__LINE__, 0, 1, "test1", 0, 0, 0, 0, 0, curname2, ECPGst_normal, "declare $0 cursor for select id , t from t1", 
  	ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 337,343 ****
  
  
  	strcpy(msg, "fetch from");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch from $0", 
  	ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
--- 337,343 ----
  
  
  	strcpy(msg, "fetch from");
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname2, ECPGc_forward, "1", ECPGst_normal, "fetch from $0", 
  	ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 352,358 ****
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "fetch");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch $0", 
  	ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
--- 352,358 ----
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "fetch");
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname2, ECPGc_forward, "1", ECPGst_normal, "fetch $0", 
  	ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 367,373 ****
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "fetch 1 from");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch 1 from $0", 
  	ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
--- 367,373 ----
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "fetch 1 from");
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname2, ECPGc_forward, "1", ECPGst_normal, "fetch 1 from $0", 
  	ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 383,389 ****
  
  	strcpy(msg, "fetch :count from");
  	count = 1;
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch $0 from $0", 
  	ECPGt_int,&(count),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char), 
--- 383,389 ----
  
  	strcpy(msg, "fetch :count from");
  	count = 1;
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname2, ECPGc_forward, "$0", ECPGst_normal, "fetch $0 from $0", 
  	ECPGt_int,&(count),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 400,406 ****
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "move");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "move absolute 0 $0", 
  	ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
--- 400,406 ----
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "move");
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname2, ECPGc_absolute, "0", ECPGst_normal, "move absolute 0 $0", 
  	ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 414,420 ****
  
  
  	strcpy(msg, "fetch 1");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch 1 $0", 
  	ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
--- 414,420 ----
  
  
  	strcpy(msg, "fetch 1");
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname2, ECPGc_forward, "1", ECPGst_normal, "fetch 1 $0", 
  	ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 430,436 ****
  
  	strcpy(msg, "fetch :count");
  	count = 1;
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch $0 $0", 
  	ECPGt_int,&(count),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char), 
--- 430,436 ----
  
  	strcpy(msg, "fetch :count");
  	count = 1;
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname2, ECPGc_forward, "$0", ECPGst_normal, "fetch $0 $0", 
  	ECPGt_int,&(count),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 447,453 ****
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "close");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "close $0", 
  	ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 140 "cursor.pgc"
--- 447,453 ----
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "close");
! 	{ ECPGclose(__LINE__, 0, 1, "test1", 0, curname2, ECPGst_normal, "close $0", 
  	ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 140 "cursor.pgc"
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 483,489 ****
  
  
  	strcpy(msg, "open");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "declare $0 cursor for $1", 
  	ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char_variable,(ECPGprepared_statement("test1", "st_id1", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
--- 483,489 ----
  
  
  	strcpy(msg, "open");
! 	{ ECPGopen(__LINE__, 0, 1, "test1", 0, 0, 0, 0, 0, curname3, ECPGst_normal, "declare $0 cursor for $1", 
  	ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char_variable,(ECPGprepared_statement("test1", "st_id1", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 493,499 ****
  if (sqlca.sqlcode < 0) exit (1);}
  #line 153 "cursor.pgc"
  
! 	{ ECPGdo(__LINE__, 0, 1, "test2", 0, ECPGst_normal, "declare $0 cursor for $1", 
  	ECPGt_char,&(curname5),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char_variable,(ECPGprepared_statement("test2", "st_id1", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
--- 493,499 ----
  if (sqlca.sqlcode < 0) exit (1);}
  #line 153 "cursor.pgc"
  
! 	{ ECPGopen(__LINE__, 0, 1, "test2", 0, 0, 0, 0, 0, curname5, ECPGst_normal, "declare $0 cursor for $1", 
  	ECPGt_char,&(curname5),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char_variable,(ECPGprepared_statement("test2", "st_id1", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 505,511 ****
  
  
  	strcpy(msg, "fetch");
! 	{ ECPGdo(__LINE__, 0, 1, "test2", 0, ECPGst_normal, "fetch $0", 
  	ECPGt_char,&(curname5),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
--- 505,511 ----
  
  
  	strcpy(msg, "fetch");
! 	{ ECPGfetch(__LINE__, 0, 1, "test2", 0, curname5, ECPGc_forward, "1", ECPGst_normal, "fetch $0", 
  	ECPGt_char,&(curname5),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 520,526 ****
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "fetch from");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch from $0", 
  	ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
--- 520,526 ----
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "fetch from");
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname3, ECPGc_forward, "1", ECPGst_normal, "fetch from $0", 
  	ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 535,541 ****
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "fetch 1 from");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch 1 from $0", 
  	ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
--- 535,541 ----
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "fetch 1 from");
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname3, ECPGc_forward, "1", ECPGst_normal, "fetch 1 from $0", 
  	ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 551,557 ****
  
  	strcpy(msg, "fetch :count from");
  	count = 1;
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch $0 from $0", 
  	ECPGt_int,&(count),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char), 
--- 551,557 ----
  
  	strcpy(msg, "fetch :count from");
  	count = 1;
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname3, ECPGc_forward, "$0", ECPGst_normal, "fetch $0 from $0", 
  	ECPGt_int,&(count),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 568,574 ****
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "move");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "move absolute 0 $0", 
  	ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 174 "cursor.pgc"
--- 568,574 ----
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "move");
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname3, ECPGc_absolute, "0", ECPGst_normal, "move absolute 0 $0", 
  	ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 174 "cursor.pgc"
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 578,584 ****
  
  
  	strcpy(msg, "fetch 1");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch 1 $0", 
  	ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
--- 578,584 ----
  
  
  	strcpy(msg, "fetch 1");
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname3, ECPGc_forward, "1", ECPGst_normal, "fetch 1 $0", 
  	ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 594,600 ****
  
  	strcpy(msg, "fetch :count");
  	count = 1;
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch $0 $0", 
  	ECPGt_int,&(count),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char), 
--- 594,600 ----
  
  	strcpy(msg, "fetch :count");
  	count = 1;
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname3, ECPGc_forward, "$0", ECPGst_normal, "fetch $0 $0", 
  	ECPGt_int,&(count),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 611,617 ****
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "close");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "close $0", 
  	ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 186 "cursor.pgc"
--- 611,617 ----
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "close");
! 	{ ECPGclose(__LINE__, 0, 1, "test1", 0, curname3, ECPGst_normal, "close $0", 
  	ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 186 "cursor.pgc"
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 619,625 ****
  if (sqlca.sqlcode < 0) exit (1);}
  #line 186 "cursor.pgc"
  
! 	{ ECPGdo(__LINE__, 0, 1, "test2", 0, ECPGst_normal, "close $0", 
  	ECPGt_char,&(curname5),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 187 "cursor.pgc"
--- 619,625 ----
  if (sqlca.sqlcode < 0) exit (1);}
  #line 186 "cursor.pgc"
  
! 	{ ECPGclose(__LINE__, 0, 1, "test2", 0, curname5, ECPGst_normal, "close $0", 
  	ECPGt_char,&(curname5),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 187 "cursor.pgc"
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 663,669 ****
  
  
  	strcpy(msg, "open");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "declare $0 cursor for $1", 
  	ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char_variable,(ECPGprepared_statement("test1", "st_id2", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
--- 663,669 ----
  
  
  	strcpy(msg, "open");
! 	{ ECPGopen(__LINE__, 0, 1, "test1", 0, 0, 0, 0, 0, curname4.arr, ECPGst_normal, "declare $0 cursor for $1", 
  	ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char_variable,(ECPGprepared_statement("test1", "st_id2", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 675,681 ****
  
  
  	strcpy(msg, "fetch from");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch from $0", 
  	ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
--- 675,681 ----
  
  
  	strcpy(msg, "fetch from");
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname4.arr, ECPGc_forward, "1", ECPGst_normal, "fetch from $0", 
  	ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 690,696 ****
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "fetch");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch $0", 
  	ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
--- 690,696 ----
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "fetch");
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname4.arr, ECPGc_forward, "1", ECPGst_normal, "fetch $0", 
  	ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 705,711 ****
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "fetch 1 from");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch 1 from $0", 
  	ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
--- 705,711 ----
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "fetch 1 from");
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname4.arr, ECPGc_forward, "1", ECPGst_normal, "fetch 1 from $0", 
  	ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 721,727 ****
  
  	strcpy(msg, "fetch :count from");
  	count = 1;
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch $0 from $0", 
  	ECPGt_int,&(count),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1), 
--- 721,727 ----
  
  	strcpy(msg, "fetch :count from");
  	count = 1;
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname4.arr, ECPGc_forward, "$0", ECPGst_normal, "fetch $0 from $0", 
  	ECPGt_int,&(count),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 738,744 ****
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "move");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "move absolute 0 $0", 
  	ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 226 "cursor.pgc"
--- 738,744 ----
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "move");
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname4.arr, ECPGc_absolute, "0", ECPGst_normal, "move absolute 0 $0", 
  	ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 226 "cursor.pgc"
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 748,754 ****
  
  
  	strcpy(msg, "fetch 1");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch 1 $0", 
  	ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
--- 748,754 ----
  
  
  	strcpy(msg, "fetch 1");
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname4.arr, ECPGc_forward, "1", ECPGst_normal, "fetch 1 $0", 
  	ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(id),(long)1,(long)1,sizeof(int), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 764,770 ****
  
  	strcpy(msg, "fetch :count");
  	count = 1;
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch $0 $0", 
  	ECPGt_int,&(count),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1), 
--- 764,770 ----
  
  	strcpy(msg, "fetch :count");
  	count = 1;
! 	{ ECPGfetch(__LINE__, 0, 1, "test1", 0, curname4.arr, ECPGc_forward, "$0", ECPGst_normal, "fetch $0 $0", 
  	ECPGt_int,&(count),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 781,787 ****
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "close");
! 	{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "close $0", 
  	ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 238 "cursor.pgc"
--- 781,787 ----
  	printf("%d %s\n", id, t);
  
  	strcpy(msg, "close");
! 	{ ECPGclose(__LINE__, 0, 1, "test1", 0, curname4.arr, ECPGst_normal, "close $0", 
  	ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 238 "cursor.pgc"
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/preproc-cursor-readahead.c postgresql.1/src/interfaces/ecpg/test/expected/preproc-cursor-readahead.c
*** postgresql/src/interfaces/ecpg/test/expected/preproc-cursor-readahead.c	2012-03-23 18:25:28.546140551 +0100
--- postgresql.1/src/interfaces/ecpg/test/expected/preproc-cursor-readahead.c	2012-03-23 20:26:43.000000000 +0100
*************** if (sqlca.sqlwarn[0] == 'W') sqlprint();
*** 183,189 ****
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 58 "cursor-readahead.pgc"
  
! 		{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare $0 scroll cursor for select * from ra_test order by id", 
  	ECPGt_char,&(curname),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 59 "cursor-readahead.pgc"
--- 183,189 ----
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 58 "cursor-readahead.pgc"
  
! 		{ ECPGopen(__LINE__, 0, 1, NULL, 0, 0, 0, 1, 0, curname, ECPGst_normal, "declare $0 scroll cursor for select * from ra_test order by id", 
  	ECPGt_char,&(curname),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 59 "cursor-readahead.pgc"
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 204,210 ****
  				id2[j] = -1;
  			}
  
! 			{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch $0 from $0", 
  	ECPGt_int,&(count),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,&(curname),(long)0,(long)1,(1)*sizeof(char), 
--- 204,210 ----
  				id2[j] = -1;
  			}
  
! 			{ ECPGfetch(__LINE__, 0, 1, NULL, 0, curname, ECPGc_forward, "$0", ECPGst_normal, "fetch $0 from $0", 
  	ECPGt_int,&(count),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,&(curname),(long)0,(long)1,(1)*sizeof(char), 
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 277,283 ****
  		else
  			printf("Reading readahead and non-readahead cursors simultaneously forward by %d record: FAILED at %d, id1 %d id2 %d\n", count, id, id1[j], id2[j]);
  
! 		{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close $0", 
  	ECPGt_char,&(curname),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 113 "cursor-readahead.pgc"
--- 277,283 ----
  		else
  			printf("Reading readahead and non-readahead cursors simultaneously forward by %d record: FAILED at %d, id1 %d id2 %d\n", count, id, id1[j], id2[j]);
  
! 		{ ECPGclose(__LINE__, 0, 1, NULL, 0, curname, ECPGst_normal, "close $0", 
  	ECPGt_char,&(curname),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 113 "cursor-readahead.pgc"
*************** if (sqlca.sqlwarn[0] == 'W') sqlprint();
*** 311,317 ****
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 118 "cursor-readahead.pgc"
  
! 		{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare $0 scroll cursor for select * from ra_test order by id", 
  	ECPGt_char,&(curname),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 119 "cursor-readahead.pgc"
--- 311,317 ----
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 118 "cursor-readahead.pgc"
  
! 		{ ECPGopen(__LINE__, 0, 1, NULL, 0, 0, 0, 1, 0, curname, ECPGst_normal, "declare $0 scroll cursor for select * from ra_test order by id", 
  	ECPGt_char,&(curname),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 119 "cursor-readahead.pgc"
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 323,329 ****
  #line 119 "cursor-readahead.pgc"
  
  
! 		{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch last from $0", 
  	ECPGt_char,&(curname),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,(id1),(long)1,(long)5,sizeof(int), 
--- 323,329 ----
  #line 119 "cursor-readahead.pgc"
  
  
! 		{ ECPGfetch(__LINE__, 0, 1, NULL, 0, curname, ECPGc_absolute, "-1", ECPGst_normal, "fetch last from $0", 
  	ECPGt_char,&(curname),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,(id1),(long)1,(long)5,sizeof(int), 
*************** if (sqlca.sqlwarn[0] == 'W') sqlprint();
*** 338,344 ****
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 121 "cursor-readahead.pgc"
  
! 		{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch from $0", 
  	ECPGt_char,&(curname),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,(id1),(long)1,(long)5,sizeof(int), 
--- 338,344 ----
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 121 "cursor-readahead.pgc"
  
! 		{ ECPGfetch(__LINE__, 0, 1, NULL, 0, curname, ECPGc_forward, "1", ECPGst_normal, "fetch from $0", 
  	ECPGt_char,&(curname),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,(id1),(long)1,(long)5,sizeof(int), 
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 398,404 ****
  				id2[j] = -1;
  			}
  
! 			{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch backward $0 from $0", 
  	ECPGt_int,&(count),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,&(curname),(long)0,(long)1,(1)*sizeof(char), 
--- 398,404 ----
  				id2[j] = -1;
  			}
  
! 			{ ECPGfetch(__LINE__, 0, 1, NULL, 0, curname, ECPGc_backward, "$0", ECPGst_normal, "fetch backward $0 from $0", 
  	ECPGt_int,&(count),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,&(curname),(long)0,(long)1,(1)*sizeof(char), 
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 467,473 ****
  		else
  			printf("Reading readahead and non-readahead cursors simultaneously backwards by %d record(s): FAILED at %d, id1 %d id2 %d\n", count, id, id1[j], id2[j]);
  
! 		{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close $0", 
  	ECPGt_char,&(curname),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 183 "cursor-readahead.pgc"
--- 467,473 ----
  		else
  			printf("Reading readahead and non-readahead cursors simultaneously backwards by %d record(s): FAILED at %d, id1 %d id2 %d\n", count, id, id1[j], id2[j]);
  
! 		{ ECPGclose(__LINE__, 0, 1, NULL, 0, curname, ECPGst_normal, "close $0", 
  	ECPGt_char,&(curname),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 183 "cursor-readahead.pgc"
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/preproc-cursor.stderr postgresql.1/src/interfaces/ecpg/test/expected/preproc-cursor.stderr
*** postgresql/src/interfaces/ecpg/test/expected/preproc-cursor.stderr	2011-12-19 10:34:50.157447864 +0100
--- postgresql.1/src/interfaces/ecpg/test/expected/preproc-cursor.stderr	2012-03-23 20:26:43.000000000 +0100
***************
*** 62,70 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 67: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 70: query: fetch forward from mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 70: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 70: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 62,86 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 67: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 70: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch forward from $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 70: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch forward from $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 70: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 70: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 70: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 70: query: move absolute 0 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 70: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 70: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 70: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 70: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 70: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 72,80 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 70: RESULT: a offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 74: query: fetch forward mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 74: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 74: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 88,112 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 70: RESULT: a offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 74: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch forward $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 74: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch forward $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 74: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 74: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 74: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 74: query: move absolute 1 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 74: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 74: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 74: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 74: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 74: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 82,90 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 74: RESULT: b offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 78: query: fetch 1 from mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 78: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 78: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 114,138 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 74: RESULT: b offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 78: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 from $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 78: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 from $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 78: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 78: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 78: start_pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 78: query: move absolute 2 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 78: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 78: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 78: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 78: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 78: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 92,100 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 78: RESULT: c offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 83: query: fetch 1 from mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 83: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 83: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 140,164 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 78: RESULT: c offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 83: before ecpg_canonical_cursor_movement amount $0 direction 2 query: fetch $0 from $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 83: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch $0 from $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 83: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 83: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 83: start_pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 83: query: move absolute 3 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 83: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 83: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 83: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 83: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 83: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 102,116 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 83: RESULT: d offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 87: query: move absolute 0 in mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 87: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 87: OK: MOVE 0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 90: query: fetch 1 mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 90: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 90: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 166,196 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 83: RESULT: d offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 87: before ecpg_canonical_cursor_movement amount 0 direction 0 query: move absolute 0 in $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 87: ecpg_canonical_cursor_movement n_amount 0 direction 0 fetchall 0 query: move absolute 0 in $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_move on line 87 backward 0 atstart 1 atend 0 pos 0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 90: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 90: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 90: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 90: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 90: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 90: query: move absolute 0 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 90: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 90: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 90: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 90: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 90: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 118,126 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 90: RESULT: a offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 95: query: fetch 1 mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 95: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 95: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 198,222 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 90: RESULT: a offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 95: before ecpg_canonical_cursor_movement amount $0 direction 2 query: fetch $0 $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 95: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch $0 $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 95: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 95: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 95: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 95: query: move absolute 1 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 95: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 95: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 95: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 95: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 95: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 140,148 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 108: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 111: query: fetch from mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 111: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 111: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 236,260 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 108: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 111: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 111: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 111: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 111: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 111: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 111: query: move absolute 0 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 111: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 111: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 111: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 111: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 111: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 150,158 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 111: RESULT: a offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 115: query: fetch mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 115: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 115: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 262,286 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 111: RESULT: a offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 115: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 115: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 115: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 115: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 115: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 115: query: move absolute 1 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 115: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 115: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 115: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 115: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 115: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 160,168 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 115: RESULT: b offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 119: query: fetch 1 from mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 119: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 119: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 288,312 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 115: RESULT: b offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 119: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 from $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 119: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 from $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 119: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 119: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 119: start_pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 119: query: move absolute 2 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 119: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 119: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 119: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 119: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 119: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 170,178 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 119: RESULT: c offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 124: query: fetch 1 from mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 124: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 124: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 314,338 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 119: RESULT: c offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 124: before ecpg_canonical_cursor_movement amount $0 direction 2 query: fetch $0 from $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 124: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch $0 from $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 124: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 124: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 124: start_pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 124: query: move absolute 3 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 124: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 124: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 124: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 124: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 124: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 180,194 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 124: RESULT: d offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 128: query: move absolute 0 mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 128: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 128: OK: MOVE 0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 131: query: fetch 1 mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 131: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 131: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 340,370 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 124: RESULT: d offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 128: before ecpg_canonical_cursor_movement amount 0 direction 0 query: move absolute 0 $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 128: ecpg_canonical_cursor_movement n_amount 0 direction 0 fetchall 0 query: move absolute 0 $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_move on line 128 backward 0 atstart 1 atend 0 pos 0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 131: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 131: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 131: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 131: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 131: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 131: query: move absolute 0 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 131: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 131: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 131: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 131: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 131: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 196,204 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 131: RESULT: a offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 136: query: fetch 1 mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 136: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 136: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 372,396 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 131: RESULT: a offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 136: before ecpg_canonical_cursor_movement amount $0 direction 2 query: fetch $0 $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 136: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch $0 $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 136: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 136: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 136: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 136: query: move absolute 1 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 136: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 136: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 136: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 136: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 136: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 228,236 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 154: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 157: query: fetch mycur; with 0 parameter(s) on connection test2
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 157: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 157: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 420,444 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 154: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 157: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 157: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 157: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 157: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 157: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 157: query: move absolute 0 in mycur; on connection test2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 157: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 157: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 157: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 157: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 157: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 238,246 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 157: RESULT: e offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 161: query: fetch from mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 161: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 161: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 446,470 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 157: RESULT: e offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 161: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 161: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 161: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 161: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 161: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 161: query: move absolute 0 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 161: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 161: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 161: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 161: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 161: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 248,256 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 161: RESULT: a offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 165: query: fetch 1 from mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 165: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 165: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 472,496 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 161: RESULT: a offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 165: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 from $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 165: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 from $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 165: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 165: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 165: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 165: query: move absolute 1 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 165: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 165: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 165: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 165: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 165: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 258,266 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 165: RESULT: b offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 170: query: fetch 1 from mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 170: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 170: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 498,522 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 165: RESULT: b offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 170: before ecpg_canonical_cursor_movement amount $0 direction 2 query: fetch $0 from $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 170: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch $0 from $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 170: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 170: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 170: start_pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 170: query: move absolute 2 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 170: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 170: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 170: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 170: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 170: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 268,282 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 170: RESULT: c offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 174: query: move absolute 0 mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 174: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 174: OK: MOVE 0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 177: query: fetch 1 mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 177: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 177: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 524,554 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 170: RESULT: c offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 174: before ecpg_canonical_cursor_movement amount 0 direction 0 query: move absolute 0 $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 174: ecpg_canonical_cursor_movement n_amount 0 direction 0 fetchall 0 query: move absolute 0 $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_move on line 174 backward 0 atstart 1 atend 0 pos 0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 177: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 177: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 177: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 177: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 177: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 177: query: move absolute 0 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 177: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 177: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 177: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 177: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 177: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 284,292 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 177: RESULT: a offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 182: query: fetch 1 mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 182: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 182: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 556,580 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 177: RESULT: a offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 182: before ecpg_canonical_cursor_movement amount $0 direction 2 query: fetch $0 $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 182: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch $0 $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 182: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 182: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 182: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 182: query: move absolute 1 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 182: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 182: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 182: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 182: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 182: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 318,326 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 206: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 209: query: fetch from mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 209: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 209: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 606,630 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 206: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 209: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch from $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 209: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch from $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 209: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 209: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 209: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 209: query: move absolute 0 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 209: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 209: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 209: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 209: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 209: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 328,336 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 209: RESULT: a offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 213: query: fetch mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 213: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 213: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 632,656 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 209: RESULT: a offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 213: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 213: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 213: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 213: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 213: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 213: query: move absolute 1 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 213: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 213: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 213: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 213: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 213: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 338,346 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 213: RESULT: b offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 217: query: fetch 1 from mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 217: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 217: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 658,682 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 213: RESULT: b offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 217: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 from $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 217: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 from $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 217: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 217: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 217: start_pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 217: query: move absolute 2 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 217: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 217: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 217: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 217: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 217: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 348,356 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 217: RESULT: c offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 222: query: fetch 1 from mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 222: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 222: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 684,708 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 217: RESULT: c offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 222: before ecpg_canonical_cursor_movement amount $0 direction 2 query: fetch $0 from $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 222: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch $0 from $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 222: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 222: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 222: start_pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 222: query: move absolute 3 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 222: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 222: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 222: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 222: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 222: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 358,372 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 222: RESULT: d offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 226: query: move absolute 0 mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 226: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 226: OK: MOVE 0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 229: query: fetch 1 mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 229: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 229: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 710,740 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 222: RESULT: d offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 226: before ecpg_canonical_cursor_movement amount 0 direction 0 query: move absolute 0 $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 226: ecpg_canonical_cursor_movement n_amount 0 direction 0 fetchall 0 query: move absolute 0 $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_move on line 226 backward 0 atstart 1 atend 0 pos 0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 229: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 229: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 229: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 229: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 229: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 229: query: move absolute 0 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 229: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 229: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 229: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 229: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 229: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 374,382 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 229: RESULT: a offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 234: query: fetch 1 mycur; with 0 parameter(s) on connection test1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 234: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 234: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 742,766 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 229: RESULT: a offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 234: before ecpg_canonical_cursor_movement amount $0 direction 2 query: fetch $0 $0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 234: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch $0 $0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 234: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 234: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 234: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 234: query: move absolute 1 in mycur; on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 234: query: fetch forward 1 from mycur; with 0 parameter(s) on connection test1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 234: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 234: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 234: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 234: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/preproc-outofscope.c postgresql.1/src/interfaces/ecpg/test/expected/preproc-outofscope.c
*** postgresql/src/interfaces/ecpg/test/expected/preproc-outofscope.c	2012-03-23 18:25:28.547140556 +0100
--- postgresql.1/src/interfaces/ecpg/test/expected/preproc-outofscope.c	2012-03-23 20:26:44.000000000 +0100
*************** get_var1(MYTYPE **myvar0, MYNULLTYPE **m
*** 201,207 ****
  static void
  open_cur1(void)
  {
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare mycur cursor for select * from a1", ECPGt_EOIT, 
  	ECPGt_int,&((*( MYTYPE  *)(ECPGget_var( 0)) ).id),(long)1,(long)1,sizeof(int), 
  	ECPGt_int,&((*( MYNULLTYPE  *)(ECPGget_var( 1)) ).id),(long)1,(long)1,sizeof(int), 
  	ECPGt_char,&((*( MYTYPE  *)(ECPGget_var( 0)) ).t),(long)64,(long)1,(64)*sizeof(char), 
--- 201,207 ----
  static void
  open_cur1(void)
  {
! 	{ ECPGopen(__LINE__, 0, 1, NULL, 0, 0, 0, 0, 0, "mycur", ECPGst_normal, "declare mycur cursor for select * from a1", ECPGt_EOIT, 
  	ECPGt_int,&((*( MYTYPE  *)(ECPGget_var( 0)) ).id),(long)1,(long)1,sizeof(int), 
  	ECPGt_int,&((*( MYNULLTYPE  *)(ECPGget_var( 1)) ).id),(long)1,(long)1,sizeof(int), 
  	ECPGt_char,&((*( MYTYPE  *)(ECPGget_var( 0)) ).t),(long)64,(long)1,(64)*sizeof(char), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 225,231 ****
  static void
  get_record1(void)
  {
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch mycur", ECPGt_EOIT, 
  	ECPGt_int,&((*( MYTYPE  *)(ECPGget_var( 0)) ).id),(long)1,(long)1,sizeof(int), 
  	ECPGt_int,&((*( MYNULLTYPE  *)(ECPGget_var( 1)) ).id),(long)1,(long)1,sizeof(int), 
  	ECPGt_char,&((*( MYTYPE  *)(ECPGget_var( 0)) ).t),(long)64,(long)1,(64)*sizeof(char), 
--- 225,231 ----
  static void
  get_record1(void)
  {
! 	{ ECPGfetch(__LINE__, 0, 1, NULL, 0, "mycur", ECPGc_forward, "1", ECPGst_normal, "fetch mycur", ECPGt_EOIT, 
  	ECPGt_int,&((*( MYTYPE  *)(ECPGget_var( 0)) ).id),(long)1,(long)1,sizeof(int), 
  	ECPGt_int,&((*( MYNULLTYPE  *)(ECPGget_var( 1)) ).id),(long)1,(long)1,sizeof(int), 
  	ECPGt_char,&((*( MYTYPE  *)(ECPGget_var( 0)) ).t),(long)64,(long)1,(64)*sizeof(char), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 249,255 ****
  static void
  close_cur1(void)
  {
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close mycur", ECPGt_EOIT, ECPGt_EORT);
  #line 58 "outofscope.pgc"
  
  if (sqlca.sqlcode < 0) exit (1);}
--- 249,255 ----
  static void
  close_cur1(void)
  {
! 	{ ECPGclose(__LINE__, 0, 1, NULL, 0, "mycur", ECPGst_normal, "close mycur", ECPGt_EOIT, ECPGt_EORT);
  #line 58 "outofscope.pgc"
  
  if (sqlca.sqlcode < 0) exit (1);}
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/preproc-outofscope.stderr postgresql.1/src/interfaces/ecpg/test/expected/preproc-outofscope.stderr
*** postgresql/src/interfaces/ecpg/test/expected/preproc-outofscope.stderr	2010-09-21 13:50:00.000000000 +0200
--- postgresql.1/src/interfaces/ecpg/test/expected/preproc-outofscope.stderr	2012-03-23 20:26:44.000000000 +0100
***************
*** 40,48 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 40: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 49: query: fetch mycur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 49: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 49: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 40,64 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 40: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 49: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch mycur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 49: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch mycur
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 49: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 49: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 49: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 49: query: move absolute 0 in mycur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 49: query: fetch forward 1 from mycur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 49: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 49: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 49: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 49: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 56,64 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 49: RESULT: a          offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 49: query: fetch mycur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 49: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 49: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 72,96 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 49: RESULT: a          offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 49: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch mycur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 49: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch mycur
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 49: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 49: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 49: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 49: query: move absolute 1 in mycur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 49: query: fetch forward 1 from mycur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 49: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 49: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 49: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 49: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 72,80 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 49: RESULT:  offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 49: query: fetch mycur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 49: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 49: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 104,128 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 49: RESULT:  offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 49: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch mycur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 49: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch mycur
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 49: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 49: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 49: start_pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 49: query: move absolute 2 in mycur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 49: query: fetch forward 1 from mycur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 49: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 49: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 49: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 49: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 88,98 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 49: RESULT: b          offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 49: query: fetch mycur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 49: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 49: correctly got 0 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 49: no data found on line 49
  [NO_PID]: sqlca: code: 100, state: 02000
--- 136,160 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 49: RESULT: b          offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 49: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch mycur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 49: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch mycur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 49: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 49: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 49: start_pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 49: query: move absolute 3 in mycur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 49: query: fetch forward 1 from mycur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 49: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 49: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 49: setting atend to true (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 49: no data found on line 49
  [NO_PID]: sqlca: code: 100, state: 02000
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/preproc-variable.c postgresql.1/src/interfaces/ecpg/test/expected/preproc-variable.c
*** postgresql/src/interfaces/ecpg/test/expected/preproc-variable.c	2012-03-23 18:25:28.547140556 +0100
--- postgresql.1/src/interfaces/ecpg/test/expected/preproc-variable.c	2012-03-23 20:26:44.000000000 +0100
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 190,196 ****
  
  
  	strcpy(msg, "open");
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare cur cursor for select name , born , age , married , children from family", ECPGt_EOIT, ECPGt_EORT);
  #line 63 "variable.pgc"
  
  if (sqlca.sqlcode < 0) exit (1);}
--- 190,196 ----
  
  
  	strcpy(msg, "open");
! 	{ ECPGopen(__LINE__, 0, 1, NULL, 0, 0, 0, 0, 0, "cur", ECPGst_normal, "declare cur cursor for select name , born , age , married , children from family", ECPGt_EOIT, ECPGt_EORT);
  #line 63 "variable.pgc"
  
  if (sqlca.sqlcode < 0) exit (1);}
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 206,212 ****
  	memset(i, 0, sizeof(ind_personal));
  	while (1) {
  		strcpy(msg, "fetch");
! 		{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch cur", ECPGt_EOIT, 
  	ECPGt_varchar,&(p->name),(long)BUFFERSIZ,(long)1,sizeof(struct varchar_1), 
  	ECPGt_int,&(i->ind_name),(long)1,(long)1,sizeof(int), 
  	ECPGt_long,&(p->birth.born),(long)1,(long)1,sizeof(long), 
--- 206,212 ----
  	memset(i, 0, sizeof(ind_personal));
  	while (1) {
  		strcpy(msg, "fetch");
! 		{ ECPGfetch(__LINE__, 0, 1, NULL, 0, "cur", ECPGc_forward, "1", ECPGst_normal, "fetch cur", ECPGt_EOIT, 
  	ECPGt_varchar,&(p->name),(long)BUFFERSIZ,(long)1,sizeof(struct varchar_1), 
  	ECPGt_int,&(i->ind_name),(long)1,(long)1,sizeof(int), 
  	ECPGt_long,&(p->birth.born),(long)1,(long)1,sizeof(long), 
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 241,247 ****
  	}
  
  	strcpy(msg, "close");
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close cur", ECPGt_EOIT, ECPGt_EORT);
  #line 89 "variable.pgc"
  
  if (sqlca.sqlcode < 0) exit (1);}
--- 241,247 ----
  	}
  
  	strcpy(msg, "close");
! 	{ ECPGclose(__LINE__, 0, 1, NULL, 0, "cur", ECPGst_normal, "close cur", ECPGt_EOIT, ECPGt_EORT);
  #line 89 "variable.pgc"
  
  if (sqlca.sqlcode < 0) exit (1);}
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/preproc-variable.stderr postgresql.1/src/interfaces/ecpg/test/expected/preproc-variable.stderr
*** postgresql/src/interfaces/ecpg/test/expected/preproc-variable.stderr	2010-09-21 13:50:00.000000000 +0200
--- postgresql.1/src/interfaces/ecpg/test/expected/preproc-variable.stderr	2012-03-23 20:26:44.000000000 +0100
***************
*** 52,60 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 63: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 72: query: fetch cur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 72: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 72: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 52,76 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 63: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch cur
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: query: move absolute 0 in cur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: query: fetch forward 1 from cur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 72: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 70,78 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 72: RESULT: 3 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 72: query: fetch cur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 72: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 72: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 86,110 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 72: RESULT: 3 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch cur
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: query: move absolute 1 in cur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: query: fetch forward 1 from cur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 72: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 88,96 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 72: RESULT: 3 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 72: query: fetch cur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 72: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 72: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 120,144 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 72: RESULT: 3 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch cur
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: start_pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: query: move absolute 2 in cur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: query: fetch forward 1 from cur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 72: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 106,114 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 72: RESULT:  offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 72: query: fetch cur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 72: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 72: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 154,178 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 72: RESULT:  offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch cur
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: start_pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: query: move absolute 3 in cur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: query: fetch forward 1 from cur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 72: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 124,132 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 72: RESULT:  offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 72: query: fetch cur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 72: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 72: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 188,212 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 72: RESULT:  offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch cur
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: backward 0 atstart 0 atend 0 pos 5
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: start_pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: query: move absolute 4 in cur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: query: fetch forward 1 from cur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: backward 0 atstart 0 atend 0 pos 5
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 72: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 142,152 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 72: RESULT:  offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 72: query: fetch cur; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 72: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 72: correctly got 0 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 72: no data found on line 72
  [NO_PID]: sqlca: code: 100, state: 02000
--- 222,246 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 72: RESULT:  offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch cur
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: backward 0 atstart 0 atend 0 pos 6
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: start_pos 5
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: query: move absolute 5 in cur; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: query: fetch forward 1 from cur; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: backward 0 atstart 0 atend 0 pos 6
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: setting atend to true (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 72: no data found on line 72
  [NO_PID]: sqlca: code: 100, state: 02000
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/sql-binary.c postgresql.1/src/interfaces/ecpg/test/expected/sql-binary.c
*** postgresql/src/interfaces/ecpg/test/expected/sql-binary.c	2010-09-21 13:50:00.000000000 +0200
--- postgresql.1/src/interfaces/ecpg/test/expected/sql-binary.c	2012-03-23 20:26:44.000000000 +0100
*************** main (void)
*** 111,122 ****
   /* declare C cursor for select name , accs , byte from empl where idnum = $1  */
  #line 58 "binary.pgc"
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare C cursor for select name , accs , byte from empl where idnum = $1 ", 
  	ECPGt_long,&(empl.idnum),(long)1,(long)1,sizeof(long), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);}
  #line 59 "binary.pgc"
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch C", ECPGt_EOIT, 
  	ECPGt_char,(empl.name),(long)21,(long)1,(21)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_short,&(empl.accs),(long)1,(long)1,sizeof(short), 
--- 111,122 ----
   /* declare C cursor for select name , accs , byte from empl where idnum = $1  */
  #line 58 "binary.pgc"
  
!   { ECPGopen(__LINE__, 0, 1, NULL, 0, 0, 0, 0, 0, "C", ECPGst_normal, "declare C cursor for select name , accs , byte from empl where idnum = $1 ", 
  	ECPGt_long,&(empl.idnum),(long)1,(long)1,sizeof(long), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);}
  #line 59 "binary.pgc"
  
!   { ECPGfetch(__LINE__, 0, 1, NULL, 0, "C", ECPGc_forward, "1", ECPGst_normal, "fetch C", ECPGt_EOIT, 
  	ECPGt_char,(empl.name),(long)21,(long)1,(21)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_short,&(empl.accs),(long)1,(long)1,sizeof(short), 
*************** main (void)
*** 138,149 ****
   /* declare B binary cursor for select name , accs , byte from empl where idnum = $1  */
  #line 70 "binary.pgc"
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare B binary cursor for select name , accs , byte from empl where idnum = $1 ", 
  	ECPGt_long,&(empl.idnum),(long)1,(long)1,sizeof(long), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);}
  #line 71 "binary.pgc"
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch B", ECPGt_EOIT, 
  	ECPGt_char,(empl.name),(long)21,(long)1,(21)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_short,&(empl.accs),(long)1,(long)1,sizeof(short), 
--- 138,149 ----
   /* declare B binary cursor for select name , accs , byte from empl where idnum = $1  */
  #line 70 "binary.pgc"
  
!   { ECPGopen(__LINE__, 0, 1, NULL, 0, 0, 0, 0, 0, "B", ECPGst_normal, "declare B binary cursor for select name , accs , byte from empl where idnum = $1 ", 
  	ECPGt_long,&(empl.idnum),(long)1,(long)1,sizeof(long), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);}
  #line 71 "binary.pgc"
  
!   { ECPGfetch(__LINE__, 0, 1, NULL, 0, "B", ECPGc_forward, "1", ECPGst_normal, "fetch B", ECPGt_EOIT, 
  	ECPGt_char,(empl.name),(long)21,(long)1,(21)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_short,&(empl.accs),(long)1,(long)1,sizeof(short), 
*************** main (void)
*** 158,164 ****
        exit (sqlca.sqlcode);
      }
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close B", ECPGt_EOIT, ECPGt_EORT);}
  #line 79 "binary.pgc"
  
  
--- 158,164 ----
        exit (sqlca.sqlcode);
      }
  
!   { ECPGclose(__LINE__, 0, 1, NULL, 0, "B", ECPGst_normal, "close B", ECPGt_EOIT, ECPGt_EORT);}
  #line 79 "binary.pgc"
  
  
*************** main (void)
*** 172,183 ****
   /* declare A binary cursor for select byte from empl where idnum = $1  */
  #line 87 "binary.pgc"
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare A binary cursor for select byte from empl where idnum = $1 ", 
  	ECPGt_long,&(empl.idnum),(long)1,(long)1,sizeof(long), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);}
  #line 88 "binary.pgc"
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch A", ECPGt_EOIT, 
  	ECPGt_char,&(pointer),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
  #line 89 "binary.pgc"
--- 172,183 ----
   /* declare A binary cursor for select byte from empl where idnum = $1  */
  #line 87 "binary.pgc"
  
!   { ECPGopen(__LINE__, 0, 1, NULL, 0, 0, 0, 0, 0, "A", ECPGst_normal, "declare A binary cursor for select byte from empl where idnum = $1 ", 
  	ECPGt_long,&(empl.idnum),(long)1,(long)1,sizeof(long), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);}
  #line 88 "binary.pgc"
  
!   { ECPGfetch(__LINE__, 0, 1, NULL, 0, "A", ECPGc_forward, "1", ECPGst_normal, "fetch A", ECPGt_EOIT, 
  	ECPGt_char,&(pointer),(long)0,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
  #line 89 "binary.pgc"
*************** main (void)
*** 188,194 ****
        exit (sqlca.sqlcode);
      }
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close A", ECPGt_EOIT, ECPGt_EORT);}
  #line 96 "binary.pgc"
  
  
--- 188,194 ----
        exit (sqlca.sqlcode);
      }
  
!   { ECPGclose(__LINE__, 0, 1, NULL, 0, "A", ECPGst_normal, "close A", ECPGt_EOIT, ECPGt_EORT);}
  #line 96 "binary.pgc"
  
  
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/sql-binary.stderr postgresql.1/src/interfaces/ecpg/test/expected/sql-binary.stderr
*** postgresql/src/interfaces/ecpg/test/expected/sql-binary.stderr	2010-09-21 13:50:00.000000000 +0200
--- postgresql.1/src/interfaces/ecpg/test/expected/sql-binary.stderr	2012-03-23 20:26:44.000000000 +0100
***************
*** 30,38 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 59: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 60: query: fetch C; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 60: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 60: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 30,54 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 59: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 60: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch C
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 60: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch C
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 60: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 60: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 60: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 60: query: move absolute 0 in C; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 60: query: fetch forward 1 from C; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 60: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 60: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 60: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 60: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 50,58 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 71: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 72: query: fetch B; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 72: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 72: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 66,90 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 71: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch B
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch B
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: query: move absolute 0 in B; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: query: fetch forward 1 from B; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 72: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 76,84 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 88: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 89: query: fetch A; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 89: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 89: correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 108,132 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 88: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 89: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch A
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 89: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch A
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 89: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 89: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 89: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 89: query: move absolute 0 in A; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 89: query: fetch forward 1 from A; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 89: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 89: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 89: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 89: correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/sql-desc.c postgresql.1/src/interfaces/ecpg/test/expected/sql-desc.c
*** postgresql/src/interfaces/ecpg/test/expected/sql-desc.c	2010-09-21 13:50:00.000000000 +0200
--- postgresql.1/src/interfaces/ecpg/test/expected/sql-desc.c	2012-03-23 20:26:44.000000000 +0100
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 245,251 ****
  	/* declare c1 cursor for $1 */
  #line 57 "desc.pgc"
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare c1 cursor for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "foo2", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_descriptor, "indesc", 0L, 0L, 0L, 
--- 245,251 ----
  	/* declare c1 cursor for $1 */
  #line 57 "desc.pgc"
  
! 	{ ECPGopen(__LINE__, 0, 1, NULL, 0, 0, 0, 0, 0, "c1", ECPGst_normal, "declare c1 cursor for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "foo2", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_descriptor, "indesc", 0L, 0L, 0L, 
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 256,262 ****
  #line 58 "desc.pgc"
  
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch next from c1", ECPGt_EOIT, 
  	ECPGt_int,&(val1output),(long)1,(long)1,sizeof(int), 
  	ECPGt_int,&(ind1),(long)1,(long)1,sizeof(int), 
  	ECPGt_char,(val2output),(long)sizeof("AAA"),(long)1,(sizeof("AAA"))*sizeof(char), 
--- 256,262 ----
  #line 58 "desc.pgc"
  
  
! 	{ ECPGfetch(__LINE__, 0, 1, NULL, 0, "c1", ECPGc_forward, "1", ECPGst_normal, "fetch next from c1", ECPGt_EOIT, 
  	ECPGt_int,&(val1output),(long)1,(long)1,sizeof(int), 
  	ECPGt_int,&(ind1),(long)1,(long)1,sizeof(int), 
  	ECPGt_char,(val2output),(long)sizeof("AAA"),(long)1,(sizeof("AAA"))*sizeof(char), 
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 269,275 ****
  	printf("val1=%d (ind1: %d) val2=%s (ind2: %d)\n",
  		val1output, ind1, val2output, ind2);
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close c1", ECPGt_EOIT, ECPGt_EORT);
  #line 64 "desc.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
--- 269,275 ----
  	printf("val1=%d (ind1: %d) val2=%s (ind2: %d)\n",
  		val1output, ind1, val2output, ind2);
  
! 	{ ECPGclose(__LINE__, 0, 1, NULL, 0, "c1", ECPGst_normal, "close c1", ECPGt_EOIT, ECPGt_EORT);
  #line 64 "desc.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 295,301 ****
  	/* declare c2 cursor for $1 */
  #line 69 "desc.pgc"
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare c2 cursor for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "foo3", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_descriptor, "indesc", 0L, 0L, 0L, 
--- 295,301 ----
  	/* declare c2 cursor for $1 */
  #line 69 "desc.pgc"
  
! 	{ ECPGopen(__LINE__, 0, 1, NULL, 0, 0, 0, 0, 0, "c2", ECPGst_normal, "declare c2 cursor for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "foo3", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_descriptor, "indesc", 0L, 0L, 0L, 
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 306,312 ****
  #line 70 "desc.pgc"
  
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch next from c2", ECPGt_EOIT, 
  	ECPGt_int,&(val1output),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,(val2output),(long)sizeof("AAA"),(long)1,(sizeof("AAA"))*sizeof(char), 
--- 306,312 ----
  #line 70 "desc.pgc"
  
  
! 	{ ECPGfetch(__LINE__, 0, 1, NULL, 0, "c2", ECPGc_forward, "1", ECPGst_normal, "fetch next from c2", ECPGt_EOIT, 
  	ECPGt_int,&(val1output),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,(val2output),(long)sizeof("AAA"),(long)1,(sizeof("AAA"))*sizeof(char), 
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 318,324 ****
  
  	printf("val1=%d val2=%s\n", val1output, val2i ? "null" : val2output);
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close c2", ECPGt_EOIT, ECPGt_EORT);
  #line 75 "desc.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
--- 318,324 ----
  
  	printf("val1=%d val2=%s\n", val1output, val2i ? "null" : val2output);
  
! 	{ ECPGclose(__LINE__, 0, 1, NULL, 0, "c2", ECPGst_normal, "close c2", ECPGt_EOIT, ECPGt_EORT);
  #line 75 "desc.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/sql-desc.stderr postgresql.1/src/interfaces/ecpg/test/expected/sql-desc.stderr
*** postgresql/src/interfaces/ecpg/test/expected/sql-desc.stderr	2010-09-21 13:50:00.000000000 +0200
--- postgresql.1/src/interfaces/ecpg/test/expected/sql-desc.stderr	2012-03-23 20:26:44.000000000 +0100
***************
*** 74,82 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 58: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 60: query: fetch next from c1; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 60: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 60: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 74,98 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 58: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 60: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch next from c1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 60: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch next from c1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 60: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 60: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 60: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 60: query: move absolute 0 in c1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 60: query: fetch forward 1 from c1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 60: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 60: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 60: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 60: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 98,106 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 70: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 72: query: fetch next from c2; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 72: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 72: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 114,138 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 70: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch next from c2
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch next from c2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 72: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: query: move absolute 0 in c2; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: query: fetch forward 1 from c2; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 72: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 72: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 72: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/sql-dyntest.c postgresql.1/src/interfaces/ecpg/test/expected/sql-dyntest.c
*** postgresql/src/interfaces/ecpg/test/expected/sql-dyntest.c	2010-09-21 13:50:00.000000000 +0200
--- postgresql.1/src/interfaces/ecpg/test/expected/sql-dyntest.c	2012-03-23 20:26:45.000000000 +0100
*************** if (sqlca.sqlcode < 0) error ( );}
*** 261,267 ****
  #line 58 "dyntest.pgc"
  
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare MYCURS cursor for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "myquery", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 60 "dyntest.pgc"
--- 261,267 ----
  #line 58 "dyntest.pgc"
  
  
!   { ECPGopen(__LINE__, 0, 1, NULL, 0, 0, 0, 0, 0, "MYCURS", ECPGst_normal, "declare MYCURS cursor for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "myquery", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 60 "dyntest.pgc"
*************** if (sqlca.sqlcode < 0) error ( );}
*** 272,278 ****
  
    while (1)
      {
!       { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch in MYCURS", ECPGt_EOIT, 
  	ECPGt_descriptor, "MYDESC", 0L, 0L, 0L, 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
  #line 64 "dyntest.pgc"
--- 272,278 ----
  
    while (1)
      {
!       { ECPGfetch(__LINE__, 0, 1, NULL, 0, "MYCURS", ECPGc_forward, "1", ECPGst_normal, "fetch in MYCURS", ECPGt_EOIT, 
  	ECPGt_descriptor, "MYDESC", 0L, 0L, 0L, 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
  #line 64 "dyntest.pgc"
*************** if (sqlca.sqlcode < 0) error ( );}
*** 468,474 ****
  	}
      }
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close MYCURS", ECPGt_EOIT, ECPGt_EORT);
  #line 194 "dyntest.pgc"
  
  if (sqlca.sqlcode < 0) error ( );}
--- 468,474 ----
  	}
      }
  
!   { ECPGclose(__LINE__, 0, 1, NULL, 0, "MYCURS", ECPGst_normal, "close MYCURS", ECPGt_EOIT, ECPGt_EORT);
  #line 194 "dyntest.pgc"
  
  if (sqlca.sqlcode < 0) error ( );}
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/sql-dyntest.stderr postgresql.1/src/interfaces/ecpg/test/expected/sql-dyntest.stderr
*** postgresql/src/interfaces/ecpg/test/expected/sql-dyntest.stderr	2010-09-21 13:50:00.000000000 +0200
--- postgresql.1/src/interfaces/ecpg/test/expected/sql-dyntest.stderr	2012-03-23 20:26:45.000000000 +0100
***************
*** 34,42 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 60: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 64: query: fetch in MYCURS; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 64: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 64: correctly got 1 tuples with 7 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 34,58 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 60: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 64: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch in MYCURS
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 64: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch in MYCURS
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 64: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 64: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 64: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 64: query: move absolute 0 in MYCURS; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 64: query: fetch forward 1 from MYCURS; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 64: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 64: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 64: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 64: correctly got 1 tuples with 7 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 204,212 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 176: RESULT: 14.07.1987 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 64: query: fetch in MYCURS; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 64: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 64: correctly got 1 tuples with 7 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 220,244 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 176: RESULT: 14.07.1987 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 64: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch in MYCURS
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 64: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch in MYCURS
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 64: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 64: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 64: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 64: query: move absolute 1 in MYCURS; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 64: query: fetch forward 1 from MYCURS; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 64: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 64: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 64: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 64: correctly got 1 tuples with 7 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 374,384 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 176: RESULT: 05.11.1999 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 64: query: fetch in MYCURS; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 64: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 64: correctly got 0 tuples with 7 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 64: no data found on line 64
  [NO_PID]: sqlca: code: 100, state: 02000
--- 406,430 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 176: RESULT: 05.11.1999 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 64: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch in MYCURS
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 64: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch in MYCURS
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 64: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 64: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 64: start_pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 64: query: move absolute 2 in MYCURS; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 64: query: fetch forward 1 from MYCURS; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 64: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 64: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 64: setting atend to true (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 64: no data found on line 64
  [NO_PID]: sqlca: code: 100, state: 02000
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/sql-execute.c postgresql.1/src/interfaces/ecpg/test/expected/sql-execute.c
*** postgresql/src/interfaces/ecpg/test/expected/sql-execute.c	2012-03-23 18:25:28.549140568 +0100
--- postgresql.1/src/interfaces/ecpg/test/expected/sql-execute.c	2012-03-23 20:26:45.000000000 +0100
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 140,146 ****
  #line 50 "execute.pgc"
  
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare CUR cursor for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "f", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 52 "execute.pgc"
--- 140,146 ----
  #line 50 "execute.pgc"
  
  
! 	{ ECPGopen(__LINE__, 0, 1, NULL, 0, 0, 0, 0, 0, "CUR", ECPGst_normal, "declare CUR cursor for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "f", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 52 "execute.pgc"
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 148,154 ****
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 52 "execute.pgc"
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch 8 in CUR", ECPGt_EOIT, 
  	ECPGt_char,(name),(long)8,(long)8,(8)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_int,(amount),(long)1,(long)8,sizeof(int), 
--- 148,154 ----
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 52 "execute.pgc"
  
! 	{ ECPGfetch(__LINE__, 0, 1, NULL, 0, "CUR", ECPGc_forward, "8", ECPGst_normal, "fetch 8 in CUR", ECPGt_EOIT, 
  	ECPGt_char,(name),(long)8,(long)8,(8)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_int,(amount),(long)1,(long)8,sizeof(int), 
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 180,186 ****
  		printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
  	}
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close CUR", ECPGt_EOIT, ECPGt_EORT);
  #line 66 "execute.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
--- 180,186 ----
  		printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
  	}
  
! 	{ ECPGclose(__LINE__, 0, 1, NULL, 0, "CUR", ECPGst_normal, "close CUR", ECPGt_EOIT, ECPGt_EORT);
  #line 66 "execute.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 205,211 ****
  #line 72 "execute.pgc"
  
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare CUR2 cursor for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "f", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_const,"1",(long)1,(long)1,strlen("1"), 
--- 205,211 ----
  #line 72 "execute.pgc"
  
  
! 	{ ECPGopen(__LINE__, 0, 1, NULL, 0, 0, 0, 0, 0, "CUR2", ECPGst_normal, "declare CUR2 cursor for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "f", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_const,"1",(long)1,(long)1,strlen("1"), 
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 215,221 ****
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 74 "execute.pgc"
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch in CUR2", ECPGt_EOIT, 
  	ECPGt_char,(name),(long)8,(long)8,(8)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_int,(amount),(long)1,(long)8,sizeof(int), 
--- 215,221 ----
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 74 "execute.pgc"
  
! 	{ ECPGfetch(__LINE__, 0, 1, NULL, 0, "CUR2", ECPGc_forward, "1", ECPGst_normal, "fetch in CUR2", ECPGt_EOIT, 
  	ECPGt_char,(name),(long)8,(long)8,(8)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_int,(amount),(long)1,(long)8,sizeof(int), 
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 247,253 ****
  		printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
  	}
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close CUR2", ECPGt_EOIT, ECPGt_EORT);
  #line 88 "execute.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
--- 247,253 ----
  		printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
  	}
  
! 	{ ECPGclose(__LINE__, 0, 1, NULL, 0, "CUR2", ECPGst_normal, "close CUR2", ECPGt_EOIT, ECPGt_EORT);
  #line 88 "execute.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/sql-execute.stderr postgresql.1/src/interfaces/ecpg/test/expected/sql-execute.stderr
*** postgresql/src/interfaces/ecpg/test/expected/sql-execute.stderr	2010-09-21 13:50:00.000000000 +0200
--- postgresql.1/src/interfaces/ecpg/test/expected/sql-execute.stderr	2012-03-23 20:26:45.000000000 +0100
***************
*** 48,105 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 52: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: query: fetch 8 in CUR; with 0 parameter(s) on connection main
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: correctly got 8 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: 1 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: 2 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: 11 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: 12 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: 101 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: 102 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: 111 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: 112 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: f offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: t offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: f offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: t offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: f offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: t offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: f offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: t offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 66: query: close CUR; with 0 parameter(s) on connection main
--- 48,233 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 52: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: before ecpg_canonical_cursor_movement amount 8 direction 2 query: fetch 8 in CUR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ecpg_canonical_cursor_movement n_amount 8 direction 2 fetchall 0 query: fetch 8 in CUR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ECPGc_forward/ECPGc_backward, step 1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 1 atend 0 pos 1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: start_pos 0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 0 in CUR; on connection main
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from CUR; with 0 parameter(s) on connection main
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 1 atend 0 pos 1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: 1 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: f offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 2
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: start_pos 1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 1 in CUR; on connection main
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from CUR; with 0 parameter(s) on connection main
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 2
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: 2 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: t offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 3
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: start_pos 2
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 2 in CUR; on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from CUR; with 0 parameter(s) on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 3
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: 11 offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: f offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 4
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: start_pos 3
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 3 in CUR; on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from CUR; with 0 parameter(s) on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 4
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: 12 offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: t offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 5
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: start_pos 4
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 4 in CUR; on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from CUR; with 0 parameter(s) on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 5
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: 101 offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: f offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 6
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: start_pos 5
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 5 in CUR; on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from CUR; with 0 parameter(s) on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 6
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: 102 offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: t offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 7
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: start_pos 6
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 6 in CUR; on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from CUR; with 0 parameter(s) on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 7
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: 111 offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: f offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 8
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: start_pos 7
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 7 in CUR; on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from CUR; with 0 parameter(s) on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 8
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: 112 offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: t offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 66: query: close CUR; with 0 parameter(s) on connection main
***************
*** 120,128 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 74: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 75: query: fetch in CUR2; with 0 parameter(s) on connection main
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 75: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 75: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 248,272 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 74: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 75: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch in CUR2
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 75: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch in CUR2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 75: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 75: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 75: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 75: query: move absolute 0 in CUR2; on connection main
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 75: query: fetch forward 1 from CUR2; with 0 parameter(s) on connection main
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 75: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 75: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 75: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 75: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/sql-fetch.c postgresql.1/src/interfaces/ecpg/test/expected/sql-fetch.c
*** postgresql/src/interfaces/ecpg/test/expected/sql-fetch.c	2010-11-24 20:16:22.776628366 +0100
--- postgresql.1/src/interfaces/ecpg/test/expected/sql-fetch.c	2012-03-23 20:26:45.000000000 +0100
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 99,105 ****
  #line 26 "fetch.pgc"
  
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare C cursor for select * from My_Table", ECPGt_EOIT, ECPGt_EORT);
  #line 28 "fetch.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
--- 99,105 ----
  #line 26 "fetch.pgc"
  
  
!   { ECPGopen(__LINE__, 0, 1, NULL, 0, 0, 0, 0, 0, "C", ECPGst_normal, "declare C cursor for select * from My_Table", ECPGt_EOIT, ECPGt_EORT);
  #line 28 "fetch.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 113,119 ****
  #line 30 "fetch.pgc"
  
    while (1) {
!   	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch 1 in C", ECPGt_EOIT, 
  	ECPGt_int,&(i),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,(str),(long)25,(long)1,(25)*sizeof(char), 
--- 113,119 ----
  #line 30 "fetch.pgc"
  
    while (1) {
!   	{ ECPGfetch(__LINE__, 0, 1, NULL, 0, "C", ECPGc_forward, "1", ECPGst_normal, "fetch 1 in C", ECPGt_EOIT, 
  	ECPGt_int,&(i),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,(str),(long)25,(long)1,(25)*sizeof(char), 
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 135,141 ****
    /* exec sql whenever not found  continue ; */
  #line 36 "fetch.pgc"
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "move backward 2 in C", ECPGt_EOIT, ECPGt_EORT);
  #line 37 "fetch.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
--- 135,141 ----
    /* exec sql whenever not found  continue ; */
  #line 36 "fetch.pgc"
  
!   { ECPGfetch(__LINE__, 0, 1, NULL, 0, "C", ECPGc_backward, "2", ECPGst_normal, "move backward 2 in C", ECPGt_EOIT, ECPGt_EORT);
  #line 37 "fetch.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 145,151 ****
  #line 37 "fetch.pgc"
  
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch $0 in C", 
  	ECPGt_int,&(count),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(i),(long)1,(long)1,sizeof(int), 
--- 145,151 ----
  #line 37 "fetch.pgc"
  
  
!   { ECPGfetch(__LINE__, 0, 1, NULL, 0, "C", ECPGc_forward, "$0", ECPGst_normal, "fetch $0 in C", 
  	ECPGt_int,&(count),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, 
  	ECPGt_int,&(i),(long)1,(long)1,sizeof(int), 
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 166,172 ****
  #line 42 "fetch.pgc"
  
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare D cursor for select * from My_Table where Item1 = $1", 
  	ECPGt_const,"1",(long)1,(long)1,strlen("1"), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 44 "fetch.pgc"
--- 166,172 ----
  #line 42 "fetch.pgc"
  
  
!   { ECPGopen(__LINE__, 0, 1, NULL, 0, 0, 0, 0, 0, "D", ECPGst_normal, "declare D cursor for select * from My_Table where Item1 = $1", 
  	ECPGt_const,"1",(long)1,(long)1,strlen("1"), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 44 "fetch.pgc"
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 182,188 ****
  #line 46 "fetch.pgc"
  
    while (1) {
!   	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch 1 in D", ECPGt_EOIT, 
  	ECPGt_int,&(i),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,(str),(long)25,(long)1,(25)*sizeof(char), 
--- 182,188 ----
  #line 46 "fetch.pgc"
  
    while (1) {
!   	{ ECPGfetch(__LINE__, 0, 1, NULL, 0, "D", ECPGc_forward, "1", ECPGst_normal, "fetch 1 in D", ECPGt_EOIT, 
  	ECPGt_int,&(i),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,(str),(long)25,(long)1,(25)*sizeof(char), 
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 200,206 ****
  
  	printf("%d: %s\n", i, str);
    }
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close D", ECPGt_EOIT, ECPGt_EORT);
  #line 51 "fetch.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
--- 200,206 ----
  
  	printf("%d: %s\n", i, str);
    }
!   { ECPGclose(__LINE__, 0, 1, NULL, 0, "D", ECPGst_normal, "close D", ECPGt_EOIT, ECPGt_EORT);
  #line 51 "fetch.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/sql-fetch.stderr postgresql.1/src/interfaces/ecpg/test/expected/sql-fetch.stderr
*** postgresql/src/interfaces/ecpg/test/expected/sql-fetch.stderr	2011-02-22 18:51:42.775511577 +0100
--- postgresql.1/src/interfaces/ecpg/test/expected/sql-fetch.stderr	2012-03-23 20:26:45.000000000 +0100
***************
*** 38,46 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 28: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 32: query: fetch 1 in C; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 32: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 32: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 38,62 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 28: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 32: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 in C
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 32: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 in C
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 32: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 32: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 32: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 32: query: move absolute 0 in C; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 32: query: fetch forward 1 from C; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 32: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 32: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 32: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 32: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 48,56 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 32: RESULT: text1 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 32: query: fetch 1 in C; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 32: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 32: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 64,88 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 32: RESULT: text1 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 32: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 in C
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 32: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 in C
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 32: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 32: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 32: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 32: query: move absolute 1 in C; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 32: query: fetch forward 1 from C; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 32: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 32: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 32: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 32: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 58,66 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 32: RESULT: text2 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 32: query: fetch 1 in C; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 32: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 32: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 90,114 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 32: RESULT: text2 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 32: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 in C
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 32: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 in C
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 32: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 32: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 32: start_pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 32: query: move absolute 2 in C; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 32: query: fetch forward 1 from C; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 32: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 32: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 32: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 32: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 68,76 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 32: RESULT: text3 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 32: query: fetch 1 in C; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 32: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 32: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 116,140 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 32: RESULT: text3 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 32: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 in C
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 32: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 in C
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 32: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 32: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 32: start_pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 32: query: move absolute 3 in C; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 32: query: fetch forward 1 from C; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 32: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 32: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 32: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 32: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 78,100 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 32: RESULT: text4 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 32: query: fetch 1 in C; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 32: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 32: correctly got 0 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 32: no data found on line 32
  [NO_PID]: sqlca: code: 100, state: 02000
! [NO_PID]: ecpg_execute on line 37: query: move backward 2 in C; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 37: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 37: OK: MOVE 2
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 39: query: fetch 1 in C; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 39: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 39: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 142,194 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 32: RESULT: text4 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 32: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 in C
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 32: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 in C
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 32: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 32: backward 0 atstart 0 atend 0 pos 5
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 32: start_pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 32: query: move absolute 4 in C; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 32: query: fetch forward 1 from C; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 32: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 32: backward 0 atstart 0 atend 0 pos 5
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 32: setting atend to true (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 32: no data found on line 32
  [NO_PID]: sqlca: code: 100, state: 02000
! [NO_PID]: ECPGfetch on line 37: before ecpg_canonical_cursor_movement amount 2 direction 3 query: move backward 2 in C
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 37: ecpg_canonical_cursor_movement n_amount -2 direction 2 fetchall 0 query: move backward 2 in C
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_move on line 37 backward 0 atstart 0 atend 0 pos 3
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 39: before ecpg_canonical_cursor_movement amount $0 direction 2 query: fetch $0 in C
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 39: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch $0 in C
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 39: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 39: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 39: start_pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 39: query: move absolute 3 in C; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 39: query: fetch forward 1 from C; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 39: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 39: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 39: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 39: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 110,118 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 44: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 48: query: fetch 1 in D; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 48: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 48: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 204,228 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 44: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 48: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 in D
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 48: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 in D
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 48: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 48: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 48: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 48: query: move absolute 0 in D; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 48: query: fetch forward 1 from D; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 48: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 48: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 48: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 48: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 120,130 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 48: RESULT: text1 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 48: query: fetch 1 in D; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 48: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 48: correctly got 0 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 48: no data found on line 48
  [NO_PID]: sqlca: code: 100, state: 02000
--- 230,254 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 48: RESULT: text1 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 48: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 in D
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 48: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 in D
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 48: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 48: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 48: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 48: query: move absolute 1 in D; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 48: query: fetch forward 1 from D; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 48: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 48: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 48: setting atend to true (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 48: no data found on line 48
  [NO_PID]: sqlca: code: 100, state: 02000
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/sql-oldexec.c postgresql.1/src/interfaces/ecpg/test/expected/sql-oldexec.c
*** postgresql/src/interfaces/ecpg/test/expected/sql-oldexec.c	2012-03-23 18:25:28.549140568 +0100
--- postgresql.1/src/interfaces/ecpg/test/expected/sql-oldexec.c	2012-03-23 20:26:45.000000000 +0100
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 140,146 ****
  #line 50 "oldexec.pgc"
  
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_normal, "declare CUR cursor for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "f", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 52 "oldexec.pgc"
--- 140,146 ----
  #line 50 "oldexec.pgc"
  
  
! 	{ ECPGopen(__LINE__, 0, 1, NULL, 1, 0, 0, 0, 0, "CUR", ECPGst_normal, "declare CUR cursor for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "f", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 52 "oldexec.pgc"
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 148,154 ****
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 52 "oldexec.pgc"
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_normal, "fetch 8 in CUR", ECPGt_EOIT, 
  	ECPGt_char,(name),(long)8,(long)8,(8)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_int,(amount),(long)1,(long)8,sizeof(int), 
--- 148,154 ----
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 52 "oldexec.pgc"
  
! 	{ ECPGfetch(__LINE__, 0, 1, NULL, 1, "CUR", ECPGc_forward, "8", ECPGst_normal, "fetch 8 in CUR", ECPGt_EOIT, 
  	ECPGt_char,(name),(long)8,(long)8,(8)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_int,(amount),(long)1,(long)8,sizeof(int), 
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 180,186 ****
  		printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
  	}
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_normal, "close CUR", ECPGt_EOIT, ECPGt_EORT);
  #line 66 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
--- 180,186 ----
  		printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
  	}
  
! 	{ ECPGclose(__LINE__, 0, 1, NULL, 1, "CUR", ECPGst_normal, "close CUR", ECPGt_EOIT, ECPGt_EORT);
  #line 66 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 199,205 ****
  #line 71 "oldexec.pgc"
  
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_normal, "declare CUR3 cursor for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "f", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_const,"1",(long)1,(long)1,strlen("1"), 
--- 199,205 ----
  #line 71 "oldexec.pgc"
  
  
! 	{ ECPGopen(__LINE__, 0, 1, NULL, 1, 0, 0, 0, 0, "CUR3", ECPGst_normal, "declare CUR3 cursor for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "f", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_const,"1",(long)1,(long)1,strlen("1"), 
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 209,215 ****
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 73 "oldexec.pgc"
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_normal, "fetch in CUR3", ECPGt_EOIT, 
  	ECPGt_char,(name),(long)8,(long)8,(8)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_int,(amount),(long)1,(long)8,sizeof(int), 
--- 209,215 ----
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 73 "oldexec.pgc"
  
! 	{ ECPGfetch(__LINE__, 0, 1, NULL, 1, "CUR3", ECPGc_forward, "1", ECPGst_normal, "fetch in CUR3", ECPGt_EOIT, 
  	ECPGt_char,(name),(long)8,(long)8,(8)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_int,(amount),(long)1,(long)8,sizeof(int), 
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 241,247 ****
  		printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
  	}
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_normal, "close CUR3", ECPGt_EOIT, ECPGt_EORT);
  #line 87 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
--- 241,247 ----
  		printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
  	}
  
! 	{ ECPGclose(__LINE__, 0, 1, NULL, 1, "CUR3", ECPGst_normal, "close CUR3", ECPGt_EOIT, ECPGt_EORT);
  #line 87 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/sql-oldexec.stderr postgresql.1/src/interfaces/ecpg/test/expected/sql-oldexec.stderr
*** postgresql/src/interfaces/ecpg/test/expected/sql-oldexec.stderr	2010-09-21 13:50:00.000000000 +0200
--- postgresql.1/src/interfaces/ecpg/test/expected/sql-oldexec.stderr	2012-03-23 20:26:45.000000000 +0100
***************
*** 48,105 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 52: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: query: fetch 8 in CUR; with 0 parameter(s) on connection main
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: correctly got 8 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: 1 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: 2 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: 11 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: 12 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: 101 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: 102 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: 111 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: 112 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: f offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: t offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: f offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: t offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: f offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: t offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: f offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: t offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 66: query: close CUR; with 0 parameter(s) on connection main
--- 48,233 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 52: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: before ecpg_canonical_cursor_movement amount 8 direction 2 query: fetch 8 in CUR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ecpg_canonical_cursor_movement n_amount 8 direction 2 fetchall 0 query: fetch 8 in CUR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 53: ECPGc_forward/ECPGc_backward, step 1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 1 atend 0 pos 1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: start_pos 0
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 0 in CUR; on connection main
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from CUR; with 0 parameter(s) on connection main
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 1 atend 0 pos 1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: 1 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: f offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 2
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: start_pos 1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 1 in CUR; on connection main
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from CUR; with 0 parameter(s) on connection main
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 2
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 53: RESULT: 2 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: t offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 3
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: start_pos 2
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 2 in CUR; on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from CUR; with 0 parameter(s) on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 3
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: 11 offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: f offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 4
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: start_pos 3
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 3 in CUR; on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from CUR; with 0 parameter(s) on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 4
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: 12 offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: t offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 5
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: start_pos 4
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 4 in CUR; on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from CUR; with 0 parameter(s) on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 5
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: 101 offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: f offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 6
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: start_pos 5
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 5 in CUR; on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from CUR; with 0 parameter(s) on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 6
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: 102 offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: t offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 7
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: start_pos 6
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 6 in CUR; on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from CUR; with 0 parameter(s) on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 7
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: 111 offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: f offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 8
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: start_pos 7
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: move absolute 7 in CUR; on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: query: fetch forward 1 from CUR; with 0 parameter(s) on connection main
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 53: using PQexec
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: backward 0 atstart 0 atend 0 pos 8
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 53: clearing atstart and atend (no FETCH)
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 3 fields
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_get_data on line 53: RESULT: 112 offset: -1; array: no
+ [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 53: RESULT: t offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 66: query: close CUR; with 0 parameter(s) on connection main
***************
*** 120,128 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 73: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 74: query: fetch in CUR3; with 0 parameter(s) on connection main
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 74: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 74: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 248,272 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 73: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 74: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch in CUR3
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 74: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch in CUR3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 74: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 74: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 74: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 74: query: move absolute 0 in CUR3; on connection main
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 74: query: fetch forward 1 from CUR3; with 0 parameter(s) on connection main
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 74: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 74: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 74: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 74: correctly got 1 tuples with 3 fields
  [NO_PID]: sqlca: code: 0, state: 00000
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/sql-quote.c postgresql.1/src/interfaces/ecpg/test/expected/sql-quote.c
*** postgresql/src/interfaces/ecpg/test/expected/sql-quote.c	2012-03-23 18:25:28.549140568 +0100
--- postgresql.1/src/interfaces/ecpg/test/expected/sql-quote.c	2012-03-23 20:26:45.000000000 +0100
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 162,168 ****
  #line 43 "quote.pgc"
  
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare C cursor for select * from \"My_Table\"", ECPGt_EOIT, ECPGt_EORT);
  #line 45 "quote.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
--- 162,168 ----
  #line 43 "quote.pgc"
  
  
!   { ECPGopen(__LINE__, 0, 1, NULL, 0, 0, 0, 0, 0, "C", ECPGst_normal, "declare C cursor for select * from \"My_Table\"", ECPGt_EOIT, ECPGt_EORT);
  #line 45 "quote.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
*************** if (sqlca.sqlcode < 0) sqlprint();}
*** 178,184 ****
  
    while (true)
    {
!   	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch C", ECPGt_EOIT, 
  	ECPGt_int,&(i),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,(var),(long)25,(long)1,(25)*sizeof(char), 
--- 178,184 ----
  
    while (true)
    {
!   	{ ECPGfetch(__LINE__, 0, 1, NULL, 0, "C", ECPGc_forward, "1", ECPGst_normal, "fetch C", ECPGt_EOIT, 
  	ECPGt_int,&(i),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_char,(var),(long)25,(long)1,(25)*sizeof(char), 
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/sql-quote.stderr postgresql.1/src/interfaces/ecpg/test/expected/sql-quote.stderr
*** postgresql/src/interfaces/ecpg/test/expected/sql-quote.stderr	2010-09-21 13:50:00.000000000 +0200
--- postgresql.1/src/interfaces/ecpg/test/expected/sql-quote.stderr	2012-03-23 20:26:45.000000000 +0100
*************** SQL error: nonstandard use of \\ in a st
*** 75,83 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 45: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 51: query: fetch C; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 51: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 51: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 75,99 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 45: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 51: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch C
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 51: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch C
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 51: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 51: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 51: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 51: query: move absolute 0 in C; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 51: query: fetch forward 1 from C; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 51: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 51: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 51: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 51: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
*************** SQL error: nonstandard use of \\ in a st
*** 85,93 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 51: RESULT: a\\b offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 51: query: fetch C; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 51: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 51: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 101,125 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 51: RESULT: a\\b offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 51: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch C
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 51: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch C
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 51: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 51: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 51: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 51: query: move absolute 1 in C; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 51: query: fetch forward 1 from C; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 51: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 51: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 51: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 51: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
*************** SQL error: nonstandard use of \\ in a st
*** 95,103 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 51: RESULT: a\\b offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 51: query: fetch C; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 51: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 51: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 127,151 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 51: RESULT: a\\b offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 51: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch C
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 51: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch C
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 51: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 51: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 51: start_pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 51: query: move absolute 2 in C; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 51: query: fetch forward 1 from C; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 51: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 51: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 51: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 51: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
*************** SQL error: nonstandard use of \\ in a st
*** 105,113 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 51: RESULT: a\\\\b offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 51: query: fetch C; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 51: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 51: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 153,177 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 51: RESULT: a\\\\b offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 51: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch C
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 51: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch C
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 51: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 51: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 51: start_pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 51: query: move absolute 3 in C; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 51: query: fetch forward 1 from C; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 51: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 51: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 51: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 51: correctly got 1 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
*************** SQL error: nonstandard use of \\ in a st
*** 115,125 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 51: RESULT: a\\b offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 51: query: fetch C; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 51: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 51: correctly got 0 tuples with 2 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 51: no data found on line 51
  [NO_PID]: sqlca: code: 100, state: 02000
--- 179,203 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 51: RESULT: a\\b offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 51: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch C
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 51: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch C
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 51: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 51: backward 0 atstart 0 atend 0 pos 5
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 51: start_pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 51: query: move absolute 4 in C; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 51: query: fetch forward 1 from C; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 51: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 51: backward 0 atstart 0 atend 0 pos 5
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 51: setting atend to true (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 51: no data found on line 51
  [NO_PID]: sqlca: code: 100, state: 02000
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/sql-sqlda.c postgresql.1/src/interfaces/ecpg/test/expected/sql-sqlda.c
*** postgresql/src/interfaces/ecpg/test/expected/sql-sqlda.c	2012-03-23 18:25:28.550140573 +0100
--- postgresql.1/src/interfaces/ecpg/test/expected/sql-sqlda.c	2012-03-23 20:26:45.000000000 +0100
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 251,257 ****
  
  
  	strcpy(msg, "open");
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare mycur1 cursor for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "st_id1", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 103 "sqlda.pgc"
--- 251,257 ----
  
  
  	strcpy(msg, "open");
! 	{ ECPGopen(__LINE__, 0, 1, NULL, 0, 0, 0, 0, 0, "mycur1", ECPGst_normal, "declare mycur1 cursor for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "st_id1", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 103 "sqlda.pgc"
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 268,274 ****
  	while (1)
  	{
  		strcpy(msg, "fetch");
! 		{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch 1 from mycur1", ECPGt_EOIT, 
  	ECPGt_sqlda, &outp_sqlda, 0L, 0L, 0L, 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
  #line 111 "sqlda.pgc"
--- 268,274 ----
  	while (1)
  	{
  		strcpy(msg, "fetch");
! 		{ ECPGfetch(__LINE__, 0, 1, NULL, 0, "mycur1", ECPGc_forward, "1", ECPGst_normal, "fetch 1 from mycur1", ECPGt_EOIT, 
  	ECPGt_sqlda, &outp_sqlda, 0L, 0L, 0L, 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
  #line 111 "sqlda.pgc"
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 289,295 ****
  
  
  	strcpy(msg, "close");
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close mycur1", ECPGt_EOIT, ECPGt_EORT);
  #line 120 "sqlda.pgc"
  
  if (sqlca.sqlcode < 0) exit (1);}
--- 289,295 ----
  
  
  	strcpy(msg, "close");
! 	{ ECPGclose(__LINE__, 0, 1, NULL, 0, "mycur1", ECPGst_normal, "close mycur1", ECPGt_EOIT, ECPGt_EORT);
  #line 120 "sqlda.pgc"
  
  if (sqlca.sqlcode < 0) exit (1);}
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 324,330 ****
  
  
  	strcpy(msg, "open");
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare mycur2 cursor for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "st_id2", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 138 "sqlda.pgc"
--- 324,330 ----
  
  
  	strcpy(msg, "open");
! 	{ ECPGopen(__LINE__, 0, 1, NULL, 0, 0, 0, 0, 0, "mycur2", ECPGst_normal, "declare mycur2 cursor for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "st_id2", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 138 "sqlda.pgc"
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 334,340 ****
  
  
  	strcpy(msg, "fetch");
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch all from mycur2", ECPGt_EOIT, 
  	ECPGt_sqlda, &outp_sqlda, 0L, 0L, 0L, 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
  #line 141 "sqlda.pgc"
--- 334,340 ----
  
  
  	strcpy(msg, "fetch");
! 	{ ECPGfetch(__LINE__, 0, 1, NULL, 0, "mycur2", ECPGc_forward, "all", ECPGst_normal, "fetch all from mycur2", ECPGt_EOIT, 
  	ECPGt_sqlda, &outp_sqlda, 0L, 0L, 0L, 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
  #line 141 "sqlda.pgc"
*************** if (sqlca.sqlcode < 0) exit (1);}
*** 357,363 ****
  	}
  
  	strcpy(msg, "close");
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close mycur2", ECPGt_EOIT, ECPGt_EORT);
  #line 157 "sqlda.pgc"
  
  if (sqlca.sqlcode < 0) exit (1);}
--- 357,363 ----
  	}
  
  	strcpy(msg, "close");
! 	{ ECPGclose(__LINE__, 0, 1, NULL, 0, "mycur2", ECPGst_normal, "close mycur2", ECPGt_EOIT, ECPGt_EORT);
  #line 157 "sqlda.pgc"
  
  if (sqlca.sqlcode < 0) exit (1);}
diff -dcrpN postgresql/src/interfaces/ecpg/test/expected/sql-sqlda.stderr postgresql.1/src/interfaces/ecpg/test/expected/sql-sqlda.stderr
*** postgresql/src/interfaces/ecpg/test/expected/sql-sqlda.stderr	2010-09-21 13:50:00.000000000 +0200
--- postgresql.1/src/interfaces/ecpg/test/expected/sql-sqlda.stderr	2012-03-23 20:26:45.000000000 +0100
***************
*** 30,38 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 103: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 111: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 111: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 111: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 30,54 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 103: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 111: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 from mycur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 111: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 from mycur1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 111: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 111: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 111: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 111: query: move absolute 0 in mycur1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 111: query: fetch forward 1 from mycur1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 111: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 111: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 111: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 111: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 60,68 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 111: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 111: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 111: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 111: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 76,100 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 111: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 111: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 from mycur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 111: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 from mycur1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 111: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 111: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 111: start_pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 111: query: move absolute 1 in mycur1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 111: query: fetch forward 1 from mycur1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 111: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 111: backward 0 atstart 0 atend 0 pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 111: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 111: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 84,92 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 111: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 111: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 111: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 111: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 116,140 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 111: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 111: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 from mycur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 111: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 from mycur1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 111: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 111: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 111: start_pos 2
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 111: query: move absolute 2 in mycur1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 111: query: fetch forward 1 from mycur1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 111: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 111: backward 0 atstart 0 atend 0 pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 111: clearing atstart and atend (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 111: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 114,124 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 111: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 111: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 111: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 111: correctly got 0 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 111: no data found on line 111
  [NO_PID]: sqlca: code: 100, state: 02000
--- 162,186 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 111: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 111: before ecpg_canonical_cursor_movement amount 1 direction 2 query: fetch 1 from mycur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 111: ecpg_canonical_cursor_movement n_amount 1 direction 2 fetchall 0 query: fetch 1 from mycur1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 111: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 111: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 111: start_pos 3
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 111: query: move absolute 3 in mycur1; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 111: query: fetch forward 1 from mycur1; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 111: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 111: backward 0 atstart 0 atend 0 pos 4
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 111: setting atend to true (no FETCH)
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: raising sqlcode 100 on line 111: no data found on line 111
  [NO_PID]: sqlca: code: 100, state: 02000
***************
*** 138,215 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 138: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 141: query: fetch all from mycur2; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 141: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 141: correctly got 3 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_build_native_sqlda on line 141 sqld = 5
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 141: new sqlda was built
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_set_native_sqlda on line 141 row 2 col 0 IS NOT NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 141: RESULT: 4 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_set_native_sqlda on line 141 row 2 col 1 IS NOT NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 141: RESULT: d offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_set_native_sqlda on line 141 row 2 col 2 IS NOT NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_set_native_sqlda on line 141 row 2 col 3 IS NOT NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 141: RESULT: 4 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_set_native_sqlda on line 141 row 2 col 4 IS NOT NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 141: RESULT: d          offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 141: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_build_native_sqlda on line 141 sqld = 5
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 141: new sqlda was built
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_set_native_sqlda on line 141 row 1 col 0 IS NOT NULL
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 141: RESULT: 2 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_set_native_sqlda on line 141 row 1 col 1 IS NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_set_native_sqlda on line 141 row 1 col 2 IS NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_set_native_sqlda on line 141 row 1 col 3 IS NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_set_native_sqlda on line 141 row 1 col 4 IS NULL
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 141: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_build_native_sqlda on line 141 sqld = 5
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 141: new sqlda was built
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 0 IS NOT NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 141: RESULT: 1 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 1 IS NOT NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 141: RESULT: a offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 2 IS NOT NULL
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 3 IS NOT NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 141: RESULT: 1 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 4 IS NOT NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 141: RESULT: a          offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 141: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 157: query: close mycur2; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 157: using PQexec
--- 200,339 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 138: OK: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 141: before ecpg_canonical_cursor_movement amount all direction 2 query: fetch all from mycur2
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 141: ecpg_canonical_cursor_movement n_amount 0 direction 2 fetchall 1 query: fetch all from mycur2
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGfetch on line 141: ECPGc_forward/ECPGc_backward, step 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 141: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 141: start_pos 0
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 141: query: move absolute 0 in mycur2; on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 141: query: fetch forward 1 from mycur2; with 0 parameter(s) on connection regress1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_cursor_execute on line 141: using PQexec
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 141: backward 0 atstart 1 atend 0 pos 1
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: recheck_cursor_position on line 141: clearing atstart and atend (no FETCH)
! [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 141: correctly got 1 tuples with 5 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_build_native_sqlda on line 141 sqld = 5
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 141: new sqlda was built
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 0 IS NOT NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 141: RESULT: 1 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 1 IS NOT NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 141: RESULT: a offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 2 IS NOT NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 3 IS NOT NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 141: RESULT: 1 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 4 IS NOT NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 141: RESULT: a          offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 141: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 141: backward 0 atstart 0 atend 0 pos 2
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 141: start_pos 1
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 141: query: move absolute 1 in mycur2; on connection regress1
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 141: query: fetch forward 1 from mycur2; with 0 parameter(s) on connection regress1
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 141: using PQexec
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 141: backward 0 atstart 0 atend 0 pos 2
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 141: clearing atstart and atend (no FETCH)
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_execute on line 141: correctly got 1 tuples with 5 fields
+ [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_build_native_sqlda on line 141 sqld = 5
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 141: new sqlda was built
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 0 IS NOT NULL
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_get_data on line 141: RESULT: 2 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 1 IS NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 2 IS NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 3 IS NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 4 IS NULL
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 141: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 141: backward 0 atstart 0 atend 0 pos 3
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 141: start_pos 2
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 141: query: move absolute 2 in mycur2; on connection regress1
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 141: query: fetch forward 1 from mycur2; with 0 parameter(s) on connection regress1
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 141: using PQexec
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 141: backward 0 atstart 0 atend 0 pos 3
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 141: clearing atstart and atend (no FETCH)
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_execute on line 141: correctly got 1 tuples with 5 fields
+ [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_build_native_sqlda on line 141 sqld = 5
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 141: new sqlda was built
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 0 IS NOT NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 141: RESULT: 4 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 1 IS NOT NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 141: RESULT: d offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 2 IS NOT NULL
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 3 IS NOT NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 141: RESULT: 4 offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 4 IS NOT NULL
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_get_data on line 141: RESULT: d          offset: -1; array: no
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 141: putting result (1 tuple 5 fields) into sqlda descriptor
  [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 141: backward 0 atstart 0 atend 0 pos 4
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 141: start_pos 3
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 141: query: move absolute 3 in mycur2; on connection regress1
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 141: query: fetch forward 1 from mycur2; with 0 parameter(s) on connection regress1
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: ecpg_cursor_execute on line 141: using PQexec
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 141: backward 0 atstart 0 atend 0 pos 4
+ [NO_PID]: sqlca: code: 0, state: 00000
+ [NO_PID]: recheck_cursor_position on line 141: setting atend to true (no FETCH)
+ [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 157: query: close mycur2; with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 157: using PQexec
