aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/test/test4.pgc
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/ecpg/test/test4.pgc')
-rw-r--r--src/interfaces/ecpg/test/test4.pgc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/interfaces/ecpg/test/test4.pgc b/src/interfaces/ecpg/test/test4.pgc
index 10a5fdca1cf..8d58af2817b 100644
--- a/src/interfaces/ecpg/test/test4.pgc
+++ b/src/interfaces/ecpg/test/test4.pgc
@@ -13,7 +13,7 @@ EXEC SQL BEGIN DECLARE SECTION;
int i = 1;
int *did = &i;
int a[10] = {9,8,7,6,5,4,3,2,1,0};
- char text[10] = "klmnopqrst";
+ char text[25] = "klmnopqrst";
char *t = (char *)malloc(10);
double f;
bool b = true;
@@ -64,6 +64,13 @@ EXEC SQL END DECLARE SECTION;
printf("Found text=%10.10s\n", t);
+ EXEC SQL SELECT a
+ INTO :text
+ FROM test
+ WHERE f = :f;
+
+ printf("Found text=%s\n", text);
+
EXEC SQL DROP TABLE test;
EXEC SQL COMMIT;