summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/test/expected
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/ecpg/test/expected')
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-array_of_struct.c143
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-array_of_struct.stderr88
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.c144
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.stderr88
4 files changed, 275 insertions, 188 deletions
diff --git a/src/interfaces/ecpg/test/expected/preproc-array_of_struct.c b/src/interfaces/ecpg/test/expected/preproc-array_of_struct.c
index 1cf371092fe..bbe904fa106 100644
--- a/src/interfaces/ecpg/test/expected/preproc-array_of_struct.c
+++ b/src/interfaces/ecpg/test/expected/preproc-array_of_struct.c
@@ -50,6 +50,13 @@ typedef struct ind {
#line 21 "array_of_struct.pgc"
+typedef struct {
+#line 26 "array_of_struct.pgc"
+ customer customers [ 10 ] ;
+ } company ;
+#line 27 "array_of_struct.pgc"
+
+
int main()
{
/* exec sql begin declare section */
@@ -60,14 +67,14 @@ int main()
typedef struct {
-#line 30 "array_of_struct.pgc"
+#line 36 "array_of_struct.pgc"
struct varchar_2 { int len; char arr[ 50 ]; } name ;
-#line 31 "array_of_struct.pgc"
+#line 37 "array_of_struct.pgc"
int phone ;
} customer2 ;
-#line 32 "array_of_struct.pgc"
+#line 38 "array_of_struct.pgc"
@@ -80,106 +87,134 @@ int main()
+
+
+
-#line 26 "array_of_struct.pgc"
+#line 32 "array_of_struct.pgc"
customer custs1 [ 10 ] ;
-#line 27 "array_of_struct.pgc"
+#line 33 "array_of_struct.pgc"
cust_ind inds [ 10 ] ;
-#line 33 "array_of_struct.pgc"
+#line 39 "array_of_struct.pgc"
customer2 custs2 [ 10 ] ;
-#line 38 "array_of_struct.pgc"
+#line 44 "array_of_struct.pgc"
struct customer3 {
-#line 36 "array_of_struct.pgc"
+#line 42 "array_of_struct.pgc"
struct varchar_3 { int len; char arr[ 50 ]; } name ;
-#line 37 "array_of_struct.pgc"
+#line 43 "array_of_struct.pgc"
int phone ;
} custs3 [ 10 ] ;
-#line 43 "array_of_struct.pgc"
+#line 49 "array_of_struct.pgc"
struct customer4 {
-#line 41 "array_of_struct.pgc"
+#line 47 "array_of_struct.pgc"
struct varchar_4 { int len; char arr[ 50 ]; } name ;
-#line 42 "array_of_struct.pgc"
+#line 48 "array_of_struct.pgc"
int phone ;
} custs4 ;
-#line 44 "array_of_struct.pgc"
+#line 51 "array_of_struct.pgc"
+ company acme ;
+
+#line 53 "array_of_struct.pgc"
int r ;
-#line 45 "array_of_struct.pgc"
+#line 54 "array_of_struct.pgc"
struct varchar_5 { int len; char arr[ 50 ]; } onlyname [ 2 ] ;
/* exec sql end declare section */
-#line 46 "array_of_struct.pgc"
+#line 55 "array_of_struct.pgc"
ECPGdebug(1, stderr);
{ ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
-#line 50 "array_of_struct.pgc"
+#line 59 "array_of_struct.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
-#line 50 "array_of_struct.pgc"
+#line 59 "array_of_struct.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 50 "array_of_struct.pgc"
+#line 59 "array_of_struct.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table customers ( c varchar ( 50 ) , p int )", ECPGt_EOIT, ECPGt_EORT);
-#line 52 "array_of_struct.pgc"
+#line 61 "array_of_struct.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
-#line 52 "array_of_struct.pgc"
+#line 61 "array_of_struct.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 52 "array_of_struct.pgc"
+#line 61 "array_of_struct.pgc"
- { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into customers values ( 'John Doe' , '12345' )", ECPGt_EOIT, ECPGt_EORT);
-#line 53 "array_of_struct.pgc"
+
+ /* First we'll insert some data using C variable references */
+ strcpy(custs1[0].name.arr, "John Doe");
+ custs1[0].name.len = strlen(custs1[0].name.arr);
+ custs1[0].phone = 12345;
+
+ strcpy(acme.customers[1].name.arr, "Jane Doe");
+ acme.customers[1].name.len = strlen(acme.customers[1].name.arr);
+ acme.customers[1].phone = 67890;
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into customers values ( $1 , $2 )",
+ ECPGt_varchar,&(custs1->name),(long)50,(long)1,sizeof(struct varchar_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(custs1[0].phone),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 73 "array_of_struct.pgc"
if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
-#line 53 "array_of_struct.pgc"
+#line 73 "array_of_struct.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
-#line 53 "array_of_struct.pgc"
+#line 73 "array_of_struct.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 53 "array_of_struct.pgc"
+#line 73 "array_of_struct.pgc"
- { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into customers values ( 'Jane Doe' , '67890' )", ECPGt_EOIT, ECPGt_EORT);
-#line 54 "array_of_struct.pgc"
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into customers values ( $1 , $2 )",
+ ECPGt_varchar,&(acme.customers[1].name),(long)50,(long)1,sizeof(struct varchar_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(acme.customers[1].phone),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 75 "array_of_struct.pgc"
if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
-#line 54 "array_of_struct.pgc"
+#line 75 "array_of_struct.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
-#line 54 "array_of_struct.pgc"
+#line 75 "array_of_struct.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 54 "array_of_struct.pgc"
+#line 75 "array_of_struct.pgc"
+
+ /* Clear the array, to be sure reading back into it actually gets data */
+ memset(custs1, 0, sizeof(customer) * 10);
+ /* Now read back the data */
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from customers limit 2", ECPGt_EOIT,
ECPGt_varchar,&(custs1->name),(long)50,(long)10,sizeof( customer ),
ECPGt_short,&(inds->name_ind),(long)1,(long)10,sizeof( struct ind ),
ECPGt_int,&(custs1->phone),(long)1,(long)10,sizeof( customer ),
ECPGt_short,&(inds->phone_ind),(long)1,(long)10,sizeof( struct ind ), ECPGt_EORT);
-#line 56 "array_of_struct.pgc"
+#line 81 "array_of_struct.pgc"
if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
-#line 56 "array_of_struct.pgc"
+#line 81 "array_of_struct.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
-#line 56 "array_of_struct.pgc"
+#line 81 "array_of_struct.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 56 "array_of_struct.pgc"
+#line 81 "array_of_struct.pgc"
printf("custs1:\n");
for (r = 0; r < 2; r++)
@@ -193,16 +228,16 @@ if (sqlca.sqlcode < 0) sqlprint();}
ECPGt_short,&(inds->name_ind),(long)1,(long)10,sizeof( struct ind ),
ECPGt_int,&(custs2->phone),(long)1,(long)10,sizeof( customer2 ),
ECPGt_short,&(inds->phone_ind),(long)1,(long)10,sizeof( struct ind ), ECPGt_EORT);
-#line 64 "array_of_struct.pgc"
+#line 89 "array_of_struct.pgc"
if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
-#line 64 "array_of_struct.pgc"
+#line 89 "array_of_struct.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
-#line 64 "array_of_struct.pgc"
+#line 89 "array_of_struct.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 64 "array_of_struct.pgc"
+#line 89 "array_of_struct.pgc"
printf("\ncusts2:\n");
for (r = 0; r < 2; r++)
@@ -216,16 +251,16 @@ if (sqlca.sqlcode < 0) sqlprint();}
ECPGt_short,&(inds->name_ind),(long)1,(long)10,sizeof( struct ind ),
ECPGt_int,&(custs3->phone),(long)1,(long)10,sizeof( struct customer3 ),
ECPGt_short,&(inds->phone_ind),(long)1,(long)10,sizeof( struct ind ), ECPGt_EORT);
-#line 72 "array_of_struct.pgc"
+#line 97 "array_of_struct.pgc"
if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
-#line 72 "array_of_struct.pgc"
+#line 97 "array_of_struct.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
-#line 72 "array_of_struct.pgc"
+#line 97 "array_of_struct.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 72 "array_of_struct.pgc"
+#line 97 "array_of_struct.pgc"
printf("\ncusts3:\n");
for (r = 0; r < 2; r++)
@@ -239,16 +274,16 @@ if (sqlca.sqlcode < 0) sqlprint();}
ECPGt_short,&(inds[0].name_ind),(long)1,(long)1,sizeof( struct ind ),
ECPGt_int,&(custs4.phone),(long)1,(long)1,sizeof( struct customer4 ),
ECPGt_short,&(inds[0].phone_ind),(long)1,(long)1,sizeof( struct ind ), ECPGt_EORT);
-#line 80 "array_of_struct.pgc"
+#line 105 "array_of_struct.pgc"
if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
-#line 80 "array_of_struct.pgc"
+#line 105 "array_of_struct.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
-#line 80 "array_of_struct.pgc"
+#line 105 "array_of_struct.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 80 "array_of_struct.pgc"
+#line 105 "array_of_struct.pgc"
printf("\ncusts4:\n");
printf( "name - %s\n", custs4.name.arr );
@@ -257,16 +292,16 @@ if (sqlca.sqlcode < 0) sqlprint();}
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select c from customers limit 2", ECPGt_EOIT,
ECPGt_varchar,(onlyname),(long)50,(long)2,sizeof(struct varchar_5),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
-#line 85 "array_of_struct.pgc"
+#line 110 "array_of_struct.pgc"
if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
-#line 85 "array_of_struct.pgc"
+#line 110 "array_of_struct.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
-#line 85 "array_of_struct.pgc"
+#line 110 "array_of_struct.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 85 "array_of_struct.pgc"
+#line 110 "array_of_struct.pgc"
printf("\nname:\n");
for (r = 0; r < 2; r++)
@@ -275,13 +310,13 @@ if (sqlca.sqlcode < 0) sqlprint();}
}
{ ECPGdisconnect(__LINE__, "ALL");
-#line 92 "array_of_struct.pgc"
+#line 117 "array_of_struct.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
-#line 92 "array_of_struct.pgc"
+#line 117 "array_of_struct.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 92 "array_of_struct.pgc"
+#line 117 "array_of_struct.pgc"
return 0;
diff --git a/src/interfaces/ecpg/test/expected/preproc-array_of_struct.stderr b/src/interfaces/ecpg/test/expected/preproc-array_of_struct.stderr
index 64aa4627cc4..fe4b5adf35c 100644
--- a/src/interfaces/ecpg/test/expected/preproc-array_of_struct.stderr
+++ b/src/interfaces/ecpg/test/expected/preproc-array_of_struct.stderr
@@ -2,85 +2,93 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 52: query: create table customers ( c varchar ( 50 ) , p int ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: ecpg_execute on line 61: query: create table customers ( c varchar ( 50 ) , p int ); with 0 parameter(s) on connection ecpg1_regression
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 52: using PQexec
+[NO_PID]: ecpg_execute on line 61: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 52: OK: CREATE TABLE
+[NO_PID]: ecpg_process_output on line 61: OK: CREATE TABLE
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 53: query: insert into customers values ( 'John Doe' , '12345' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: ecpg_execute on line 72: query: insert into customers values ( $1 , $2 ); with 2 parameter(s) on connection ecpg1_regression
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 53: using PQexec
+[NO_PID]: ecpg_execute on line 72: using PQexecParams
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 53: OK: INSERT 0 1
+[NO_PID]: ecpg_free_params on line 72: parameter 1 = John Doe
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 54: query: insert into customers values ( 'Jane Doe' , '67890' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: ecpg_free_params on line 72: parameter 2 = 12345
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 54: using PQexec
+[NO_PID]: ecpg_process_output on line 72: OK: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 54: OK: INSERT 0 1
+[NO_PID]: ecpg_execute on line 74: query: insert into customers values ( $1 , $2 ); with 2 parameter(s) on connection ecpg1_regression
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 56: query: select * from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: ecpg_execute on line 74: using PQexecParams
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 56: using PQexec
+[NO_PID]: ecpg_free_params on line 74: parameter 1 = Jane Doe
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 56: correctly got 2 tuples with 2 fields
+[NO_PID]: ecpg_free_params on line 74: parameter 2 = 67890
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 56: RESULT: John Doe offset: -1; array: no
+[NO_PID]: ecpg_process_output on line 74: OK: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 56: RESULT: Jane Doe offset: -1; array: no
+[NO_PID]: ecpg_execute on line 81: query: select * from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 56: RESULT: 12345 offset: -1; array: no
+[NO_PID]: ecpg_execute on line 81: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 56: RESULT: 67890 offset: -1; array: no
+[NO_PID]: ecpg_process_output on line 81: correctly got 2 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 64: query: select * from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: ecpg_get_data on line 81: RESULT: John Doe offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 64: using PQexec
+[NO_PID]: ecpg_get_data on line 81: RESULT: Jane Doe offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 64: correctly got 2 tuples with 2 fields
+[NO_PID]: ecpg_get_data on line 81: RESULT: 12345 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 64: RESULT: John Doe offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 81: RESULT: 67890 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 64: RESULT: Jane Doe offset: -1; array: no
+[NO_PID]: ecpg_execute on line 89: query: select * from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 64: RESULT: 12345 offset: -1; array: no
+[NO_PID]: ecpg_execute on line 89: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 64: RESULT: 67890 offset: -1; array: no
+[NO_PID]: ecpg_process_output on line 89: correctly got 2 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 72: query: select * from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: ecpg_get_data on line 89: RESULT: John Doe offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 72: using PQexec
+[NO_PID]: ecpg_get_data on line 89: RESULT: Jane Doe offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 72: correctly got 2 tuples with 2 fields
+[NO_PID]: ecpg_get_data on line 89: RESULT: 12345 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 72: RESULT: John Doe offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 89: RESULT: 67890 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 72: RESULT: Jane Doe offset: -1; array: no
+[NO_PID]: ecpg_execute on line 97: query: select * from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 72: RESULT: 12345 offset: -1; array: no
+[NO_PID]: ecpg_execute on line 97: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 72: RESULT: 67890 offset: -1; array: no
+[NO_PID]: ecpg_process_output on line 97: correctly got 2 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 80: query: select * from customers limit 1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: ecpg_get_data on line 97: RESULT: John Doe offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 80: using PQexec
+[NO_PID]: ecpg_get_data on line 97: RESULT: Jane Doe offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 80: correctly got 1 tuples with 2 fields
+[NO_PID]: ecpg_get_data on line 97: RESULT: 12345 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 80: RESULT: John Doe offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 97: RESULT: 67890 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 80: RESULT: 12345 offset: -1; array: no
+[NO_PID]: ecpg_execute on line 105: query: select * from customers limit 1; with 0 parameter(s) on connection ecpg1_regression
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 85: query: select c from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: ecpg_execute on line 105: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 85: using PQexec
+[NO_PID]: ecpg_process_output on line 105: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 85: correctly got 2 tuples with 1 fields
+[NO_PID]: ecpg_get_data on line 105: RESULT: John Doe offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 85: RESULT: John Doe offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 105: RESULT: 12345 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 85: RESULT: Jane Doe offset: -1; array: no
+[NO_PID]: ecpg_execute on line 110: query: select c from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 110: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 110: correctly got 2 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 110: RESULT: John Doe offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 110: RESULT: Jane Doe offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: connection ecpg1_regression closed
[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.c b/src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.c
index 7b1f58e835f..e59ace24f12 100644
--- a/src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.c
+++ b/src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.c
@@ -51,6 +51,13 @@ typedef struct ind {
#line 22 "pointer_to_struct.pgc"
+typedef struct {
+#line 27 "pointer_to_struct.pgc"
+ customer * customers ;
+ } company ;
+#line 28 "pointer_to_struct.pgc"
+
+
int main()
{
/* exec sql begin declare section */
@@ -61,14 +68,14 @@ int main()
typedef struct {
-#line 31 "pointer_to_struct.pgc"
+#line 37 "pointer_to_struct.pgc"
struct varchar_2 { int len; char arr[ 50 ]; } name ;
-#line 32 "pointer_to_struct.pgc"
+#line 38 "pointer_to_struct.pgc"
int phone ;
} customer2 ;
-#line 33 "pointer_to_struct.pgc"
+#line 39 "pointer_to_struct.pgc"
@@ -85,105 +92,134 @@ int main()
+
+
-#line 27 "pointer_to_struct.pgc"
+#line 33 "pointer_to_struct.pgc"
customer * custs1 = ( customer * ) malloc ( sizeof ( customer ) * 10 ) ;
-#line 28 "pointer_to_struct.pgc"
+#line 34 "pointer_to_struct.pgc"
cust_ind * inds = ( cust_ind * ) malloc ( sizeof ( cust_ind ) * 10 ) ;
-#line 34 "pointer_to_struct.pgc"
+#line 40 "pointer_to_struct.pgc"
customer2 * custs2 = ( customer2 * ) malloc ( sizeof ( customer2 ) * 10 ) ;
-#line 40 "pointer_to_struct.pgc"
+#line 46 "pointer_to_struct.pgc"
struct customer3 {
-#line 38 "pointer_to_struct.pgc"
+#line 44 "pointer_to_struct.pgc"
char name [ 50 ] ;
-#line 39 "pointer_to_struct.pgc"
+#line 45 "pointer_to_struct.pgc"
int phone ;
} * custs3 = ( struct customer3 * ) malloc ( sizeof ( struct customer3 ) * 10 ) ;
-#line 46 "pointer_to_struct.pgc"
+#line 52 "pointer_to_struct.pgc"
struct customer4 {
-#line 44 "pointer_to_struct.pgc"
+#line 50 "pointer_to_struct.pgc"
struct varchar_3 { int len; char arr[ 50 ]; } name ;
-#line 45 "pointer_to_struct.pgc"
+#line 51 "pointer_to_struct.pgc"
int phone ;
} * custs4 = ( struct customer4 * ) malloc ( sizeof ( struct customer4 ) ) ;
-#line 48 "pointer_to_struct.pgc"
+#line 54 "pointer_to_struct.pgc"
+ company acme ;
+
+#line 56 "pointer_to_struct.pgc"
int r ;
-#line 49 "pointer_to_struct.pgc"
+#line 57 "pointer_to_struct.pgc"
struct varchar_4 { int len; char arr[ 50 ]; } onlyname [ 2 ] ;
/* exec sql end declare section */
-#line 50 "pointer_to_struct.pgc"
+#line 58 "pointer_to_struct.pgc"
ECPGdebug(1, stderr);
+ acme.customers = (customer *) malloc(sizeof(customer) * 10);
+
{ ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
-#line 54 "pointer_to_struct.pgc"
+#line 64 "pointer_to_struct.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
-#line 54 "pointer_to_struct.pgc"
+#line 64 "pointer_to_struct.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 54 "pointer_to_struct.pgc"
+#line 64 "pointer_to_struct.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table customers ( c varchar ( 50 ) , p int )", ECPGt_EOIT, ECPGt_EORT);
-#line 56 "pointer_to_struct.pgc"
+#line 66 "pointer_to_struct.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
-#line 56 "pointer_to_struct.pgc"
+#line 66 "pointer_to_struct.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 56 "pointer_to_struct.pgc"
+#line 66 "pointer_to_struct.pgc"
- { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into customers values ( 'John Doe' , '12345' )", ECPGt_EOIT, ECPGt_EORT);
-#line 57 "pointer_to_struct.pgc"
+
+ /* First we'll insert some data using C variable references */
+ strcpy(custs1[0].name.arr, "John Doe");
+ custs1[0].name.len = strlen(custs1[0].name.arr);
+ custs1[0].phone = 12345;
+
+ strcpy(acme.customers[1].name.arr, "Jane Doe");
+ acme.customers[1].name.len = strlen(acme.customers[1].name.arr);
+ acme.customers[1].phone = 67890;
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into customers values ( $1 , $2 )",
+ ECPGt_varchar,&(custs1->name),(long)50,(long)1,sizeof(struct varchar_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(custs1[0].phone),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 78 "pointer_to_struct.pgc"
if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
-#line 57 "pointer_to_struct.pgc"
+#line 78 "pointer_to_struct.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
-#line 57 "pointer_to_struct.pgc"
+#line 78 "pointer_to_struct.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 57 "pointer_to_struct.pgc"
+#line 78 "pointer_to_struct.pgc"
- { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into customers values ( 'Jane Doe' , '67890' )", ECPGt_EOIT, ECPGt_EORT);
-#line 58 "pointer_to_struct.pgc"
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into customers values ( $1 , $2 )",
+ ECPGt_varchar,&(acme.customers[1].name),(long)50,(long)1,sizeof(struct varchar_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(acme.customers[1].phone),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 80 "pointer_to_struct.pgc"
if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
-#line 58 "pointer_to_struct.pgc"
+#line 80 "pointer_to_struct.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
-#line 58 "pointer_to_struct.pgc"
+#line 80 "pointer_to_struct.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 58 "pointer_to_struct.pgc"
+#line 80 "pointer_to_struct.pgc"
+
+ /* Clear the array, to be sure reading back into it actually gets data */
+ memset(custs1, 0, sizeof(customer) * 10);
+ /* Now read back the data */
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from customers limit 2", ECPGt_EOIT,
ECPGt_varchar,&(custs1->name),(long)50,(long)-1,sizeof( customer ),
ECPGt_short,&(inds->name_ind),(long)1,(long)-1,sizeof( struct ind ),
ECPGt_int,&(custs1->phone),(long)1,(long)-1,sizeof( customer ),
ECPGt_short,&(inds->phone_ind),(long)1,(long)-1,sizeof( struct ind ), ECPGt_EORT);
-#line 60 "pointer_to_struct.pgc"
+#line 86 "pointer_to_struct.pgc"
if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
-#line 60 "pointer_to_struct.pgc"
+#line 86 "pointer_to_struct.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
-#line 60 "pointer_to_struct.pgc"
+#line 86 "pointer_to_struct.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 60 "pointer_to_struct.pgc"
+#line 86 "pointer_to_struct.pgc"
printf("custs1:\n");
for (r = 0; r < 2; r++)
@@ -197,16 +233,16 @@ if (sqlca.sqlcode < 0) sqlprint();}
ECPGt_short,&(inds->name_ind),(long)1,(long)-1,sizeof( struct ind ),
ECPGt_int,&(custs2->phone),(long)1,(long)-1,sizeof( customer2 ),
ECPGt_short,&(inds->phone_ind),(long)1,(long)-1,sizeof( struct ind ), ECPGt_EORT);
-#line 68 "pointer_to_struct.pgc"
+#line 94 "pointer_to_struct.pgc"
if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
-#line 68 "pointer_to_struct.pgc"
+#line 94 "pointer_to_struct.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
-#line 68 "pointer_to_struct.pgc"
+#line 94 "pointer_to_struct.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 68 "pointer_to_struct.pgc"
+#line 94 "pointer_to_struct.pgc"
printf("\ncusts2:\n");
for (r = 0; r < 2; r++)
@@ -220,16 +256,16 @@ if (sqlca.sqlcode < 0) sqlprint();}
ECPGt_short,&(inds->name_ind),(long)1,(long)-1,sizeof( struct ind ),
ECPGt_int,&(custs3->phone),(long)1,(long)-1,sizeof( struct customer3 ),
ECPGt_short,&(inds->phone_ind),(long)1,(long)-1,sizeof( struct ind ), ECPGt_EORT);
-#line 76 "pointer_to_struct.pgc"
+#line 102 "pointer_to_struct.pgc"
if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
-#line 76 "pointer_to_struct.pgc"
+#line 102 "pointer_to_struct.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
-#line 76 "pointer_to_struct.pgc"
+#line 102 "pointer_to_struct.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 76 "pointer_to_struct.pgc"
+#line 102 "pointer_to_struct.pgc"
printf("\ncusts3:\n");
for (r = 0; r < 2; r++)
@@ -243,16 +279,16 @@ if (sqlca.sqlcode < 0) sqlprint();}
ECPGt_short,&(inds->name_ind),(long)1,(long)-1,sizeof( struct ind ),
ECPGt_int,&(custs4->phone),(long)1,(long)-1,sizeof( struct customer4 ),
ECPGt_short,&(inds->phone_ind),(long)1,(long)-1,sizeof( struct ind ), ECPGt_EORT);
-#line 84 "pointer_to_struct.pgc"
+#line 110 "pointer_to_struct.pgc"
if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
-#line 84 "pointer_to_struct.pgc"
+#line 110 "pointer_to_struct.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
-#line 84 "pointer_to_struct.pgc"
+#line 110 "pointer_to_struct.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 84 "pointer_to_struct.pgc"
+#line 110 "pointer_to_struct.pgc"
printf("\ncusts4:\n");
printf( "name - %s\n", custs4->name.arr );
@@ -261,16 +297,16 @@ if (sqlca.sqlcode < 0) sqlprint();}
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select c from customers limit 2", ECPGt_EOIT,
ECPGt_varchar,(onlyname),(long)50,(long)2,sizeof(struct varchar_4),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
-#line 89 "pointer_to_struct.pgc"
+#line 115 "pointer_to_struct.pgc"
if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
-#line 89 "pointer_to_struct.pgc"
+#line 115 "pointer_to_struct.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
-#line 89 "pointer_to_struct.pgc"
+#line 115 "pointer_to_struct.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 89 "pointer_to_struct.pgc"
+#line 115 "pointer_to_struct.pgc"
printf("\nname:\n");
for (r = 0; r < 2; r++)
@@ -279,13 +315,13 @@ if (sqlca.sqlcode < 0) sqlprint();}
}
{ ECPGdisconnect(__LINE__, "ALL");
-#line 96 "pointer_to_struct.pgc"
+#line 122 "pointer_to_struct.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
-#line 96 "pointer_to_struct.pgc"
+#line 122 "pointer_to_struct.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 96 "pointer_to_struct.pgc"
+#line 122 "pointer_to_struct.pgc"
/* All the memory will anyway be freed at the end */
diff --git a/src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.stderr b/src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.stderr
index 707640860b8..a561583936b 100644
--- a/src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.stderr
+++ b/src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.stderr
@@ -2,85 +2,93 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 56: query: create table customers ( c varchar ( 50 ) , p int ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: ecpg_execute on line 66: query: create table customers ( c varchar ( 50 ) , p int ); with 0 parameter(s) on connection ecpg1_regression
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 56: using PQexec
+[NO_PID]: ecpg_execute on line 66: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 56: OK: CREATE TABLE
+[NO_PID]: ecpg_process_output on line 66: OK: CREATE TABLE
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 57: query: insert into customers values ( 'John Doe' , '12345' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: ecpg_execute on line 77: query: insert into customers values ( $1 , $2 ); with 2 parameter(s) on connection ecpg1_regression
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 57: using PQexec
+[NO_PID]: ecpg_execute on line 77: using PQexecParams
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 57: OK: INSERT 0 1
+[NO_PID]: ecpg_free_params on line 77: parameter 1 = John Doe
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 58: query: insert into customers values ( 'Jane Doe' , '67890' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: ecpg_free_params on line 77: parameter 2 = 12345
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 58: using PQexec
+[NO_PID]: ecpg_process_output on line 77: OK: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 58: OK: INSERT 0 1
+[NO_PID]: ecpg_execute on line 79: query: insert into customers values ( $1 , $2 ); with 2 parameter(s) on connection ecpg1_regression
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 60: query: select * from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: ecpg_execute on line 79: using PQexecParams
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 60: using PQexec
+[NO_PID]: ecpg_free_params on line 79: parameter 1 = Jane Doe
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 60: correctly got 2 tuples with 2 fields
+[NO_PID]: ecpg_free_params on line 79: parameter 2 = 67890
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 60: RESULT: John Doe offset: -1; array: no
+[NO_PID]: ecpg_process_output on line 79: OK: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 60: RESULT: Jane Doe offset: -1; array: no
+[NO_PID]: ecpg_execute on line 86: query: select * from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 60: RESULT: 12345 offset: -1; array: no
+[NO_PID]: ecpg_execute on line 86: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 60: RESULT: 67890 offset: -1; array: no
+[NO_PID]: ecpg_process_output on line 86: correctly got 2 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 68: query: select * from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: ecpg_get_data on line 86: RESULT: John Doe offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 68: using PQexec
+[NO_PID]: ecpg_get_data on line 86: RESULT: Jane Doe offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 68: correctly got 2 tuples with 2 fields
+[NO_PID]: ecpg_get_data on line 86: RESULT: 12345 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 68: RESULT: John Doe offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 86: RESULT: 67890 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 68: RESULT: Jane Doe offset: -1; array: no
+[NO_PID]: ecpg_execute on line 94: query: select * from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 68: RESULT: 12345 offset: -1; array: no
+[NO_PID]: ecpg_execute on line 94: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 68: RESULT: 67890 offset: -1; array: no
+[NO_PID]: ecpg_process_output on line 94: correctly got 2 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 76: query: select * from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: ecpg_get_data on line 94: RESULT: John Doe offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 76: using PQexec
+[NO_PID]: ecpg_get_data on line 94: RESULT: Jane Doe offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 76: correctly got 2 tuples with 2 fields
+[NO_PID]: ecpg_get_data on line 94: RESULT: 12345 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 76: RESULT: John Doe offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 94: RESULT: 67890 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 76: RESULT: Jane Doe offset: -1; array: no
+[NO_PID]: ecpg_execute on line 102: query: select * from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 76: RESULT: 12345 offset: -1; array: no
+[NO_PID]: ecpg_execute on line 102: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 76: RESULT: 67890 offset: -1; array: no
+[NO_PID]: ecpg_process_output on line 102: correctly got 2 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 84: query: select * from customers limit 1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: ecpg_get_data on line 102: RESULT: John Doe offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 84: using PQexec
+[NO_PID]: ecpg_get_data on line 102: RESULT: Jane Doe offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 84: correctly got 1 tuples with 2 fields
+[NO_PID]: ecpg_get_data on line 102: RESULT: 12345 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 84: RESULT: John Doe offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 102: RESULT: 67890 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 84: RESULT: 12345 offset: -1; array: no
+[NO_PID]: ecpg_execute on line 110: query: select * from customers limit 1; with 0 parameter(s) on connection ecpg1_regression
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 89: query: select c from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: ecpg_execute on line 110: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 89: using PQexec
+[NO_PID]: ecpg_process_output on line 110: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 89: correctly got 2 tuples with 1 fields
+[NO_PID]: ecpg_get_data on line 110: RESULT: John Doe offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 89: RESULT: John Doe offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 110: RESULT: 12345 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 89: RESULT: Jane Doe offset: -1; array: no
+[NO_PID]: ecpg_execute on line 115: query: select c from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
+[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_process_output on line 115: correctly got 2 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 115: RESULT: John Doe offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 115: RESULT: Jane Doe offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: connection ecpg1_regression closed
[NO_PID]: sqlca: code: 0, state: 00000