summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/test/testdynalloc.pgc
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/ecpg/test/testdynalloc.pgc')
-rw-r--r--src/interfaces/ecpg/test/testdynalloc.pgc33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/interfaces/ecpg/test/testdynalloc.pgc b/src/interfaces/ecpg/test/testdynalloc.pgc
deleted file mode 100644
index a859b5f810a..00000000000
--- a/src/interfaces/ecpg/test/testdynalloc.pgc
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <stdio.h>
-exec sql include sqlca;
-#include <stdlib.h>
-
-int main(void)
-{
- exec sql begin declare section;
- char **cpp=0;
- int *ipointer=0;
- exec sql end declare section;
- int i;
-
- if (getenv("SQLOPT")) ECPGdebug(1,stderr);
-
- exec sql whenever sqlerror do sqlprint();
- exec sql connect to postgres;
-
- exec sql allocate descriptor mydesc;
- exec sql select tablename into descriptor mydesc from pg_tables;
- exec sql get descriptor mydesc value 1 :cpp=DATA, :ipointer=INDICATOR;
-
- printf("Result ");
- for (i=0;i<sqlca.sqlerrd[2];++i)
- { if (ipointer[i]) printf("NULL, ");
- else printf("'%s', ",cpp[i]);
- }
- ECPGfree_auto_mem();
- printf("\n");
-
- exec sql deallocate descriptor mydesc;
- exec sql disconnect;
- return 0;
-}