aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/test/preproc/array_of_struct.pgc
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/ecpg/test/preproc/array_of_struct.pgc')
-rw-r--r--src/interfaces/ecpg/test/preproc/array_of_struct.pgc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/interfaces/ecpg/test/preproc/array_of_struct.pgc b/src/interfaces/ecpg/test/preproc/array_of_struct.pgc
index 52f952d639f..50fde0662ab 100644
--- a/src/interfaces/ecpg/test/preproc/array_of_struct.pgc
+++ b/src/interfaces/ecpg/test/preproc/array_of_struct.pgc
@@ -42,6 +42,7 @@ int main( int argc, char * argv[] )
int phone;
} custs4;
int r;
+ varchar onlyname[2][50];
EXEC SQL end declare section;
ECPGdebug(1, stderr);
@@ -81,6 +82,13 @@ int main( int argc, char * argv[] )
printf( "name - %s\n", custs4.name.arr );
printf( "phone - %d\n", custs4.phone );
+ EXEC SQL select c INTO :onlyname from customers limit 2;
+ printf("\nname:\n");
+ for (r = 0; r < 2; r++)
+ {
+ printf( "name - %s\n", onlyname[r].arr );
+ }
+
EXEC SQL disconnect all;
return( 0 );