Age Owner Branch data TLA Line data Source code
1 : : #include <stdio.h>
2 : :
3 : : EXEC SQL INCLUDE sqlca;
4 : : exec sql include ../regression;
5 : :
6 : : EXEC SQL WHENEVER SQLERROR sqlprint;
7 : :
8 : : int
6465 meskes@postgresql.or 9 :CBC 1 : main ()
10 : : {
11 : 1 : ECPGdebug (1, stderr);
12 : :
13 : 1 : EXEC SQL CONNECT TO REGRESSDB1;
14 [ - + ]: 1 : EXEC SQL CREATE TABLE foo (a int, b varchar);
15 [ - + ]: 1 : EXEC SQL INSERT INTO foo VALUES (5, 'abc');
16 [ - + ]: 1 : EXEC SQL INSERT INTO foo VALUES (6, 'def');
17 [ - + ]: 1 : EXEC SQL INSERT INTO foo VALUES (7, 'ghi');
18 [ - + ]: 1 :
19 : 1 : EXEC SQL COPY foo TO STDOUT WITH DELIMITER ',';
20 [ - + ]: 1 : printf ("copy to STDOUT : sqlca.sqlcode = %ld\n", sqlca.sqlcode);
21 : :
22 : 1 : EXEC SQL DISCONNECT;
23 [ - + ]: 1 :
24 : 1 : return 0;
25 : : }
|