#include exec sql include sqlca; #include exec sql include ../regression; int main(void) { exec sql begin declare section; int *d1=0; double *d2=0; char **d3=0; char **d4=0; char **d5=0; char **d6=0; char **d7=0; /* char **d8=0; */ char **d9=0; int *i1=0; int *i2=0; int *i3=0; int *i4=0; int *i5=0; int *i6=0; int *i7=0; /* int *i8=0; */ int *i9=0; exec sql end declare section; int i; ECPGdebug(1, stderr); exec sql whenever sqlerror do sqlprint(); exec sql connect to REGRESSDB1; exec sql set datestyle to mdy; exec sql create table test (a serial, b numeric(12,3), c varchar, d varchar(3), e char(4), f timestamptz, g boolean, h box, i inet); exec sql insert into test (b, c, d, e, f, g, h, i) values (23.456, 'varchar', 'v', 'c', '2003-03-03 12:33:07 PDT', true, '(1,2,3,4)', '2001:4f8:3:ba:2e0:81ff:fe22:d1f1/128'); exec sql insert into test (b, c, d, e, f, g, h, i) values (2.446456, NULL, 'v', 'c', '2003-03-03 12:33:07 PDT', false, NULL, NULL); exec sql allocate descriptor mydesc; exec sql select a,b,c,d,e,f,g,h,i into sql descriptor mydesc from test order by a; exec sql get descriptor mydesc value 1 :d1=DATA, :i1=INDICATOR; exec sql get descriptor mydesc value 2 :d2=DATA, :i2=INDICATOR; exec sql get descriptor mydesc value 3 :d3=DATA, :i3=INDICATOR; exec sql get descriptor mydesc value 4 :d4=DATA, :i4=INDICATOR; exec sql get descriptor mydesc value 5 :d5=DATA, :i5=INDICATOR; exec sql get descriptor mydesc value 6 :d6=DATA, :i6=INDICATOR; exec sql get descriptor mydesc value 7 :d7=DATA, :i7=INDICATOR; /* skip box for now */ /* exec sql get descriptor mydesc value 8 :d8=DATA, :i8=INDICATOR; */ exec sql get descriptor mydesc value 9 :d9=DATA, :i9=INDICATOR; printf("Result:\n"); for (i=0;i