9#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
11#line 1 "test_informix2.pgc"
18#ifndef POSTGRES_SQLCA_H
19#define POSTGRES_SQLCA_H
22#if defined(WIN32) || defined(__CYGWIN__)
23#define PGDLLIMPORT __declspec (dllimport)
29#define SQLERRMC_LEN 150
75#ifndef POSTGRES_ECPG_INTERNAL
76#define sqlca (*ECPGget_sqlca())
85#line 5 "test_informix2.pgc"
95#line 6 "test_informix2.pgc"
100static void sql_check(
const char *
fn,
const char *caller,
int ignore)
102 char errorstring[255];
111 sprintf(errorstring,
"**SQL error %ld doing '%s' in function '%s'. [%s]",
113 fprintf(stderr,
"%s", errorstring);
114 printf(
"%s\n", errorstring);
117 {
ECPGtrans(__LINE__, NULL,
"rollback");}
118#line 27 "test_informix2.pgc"
123 sprintf(errorstring,
"Rollback successful.\n");
125 sprintf(errorstring,
"Rollback failed with code %ld.\n",
SQLCODE);
128 fprintf(stderr,
"%s", errorstring);
129 printf(
"%s\n", errorstring);
145#line 47 "test_informix2.pgc"
148#line 48 "test_informix2.pgc"
151#line 49 "test_informix2.pgc"
154#line 50 "test_informix2.pgc"
157#line 51 "test_informix2.pgc"
160#line 52 "test_informix2.pgc"
166#line 56 "test_informix2.pgc"
171 strcpy(
dbname,
"ecpg1_regression");
173#line 61 "test_informix2.pgc"
176#line 61 "test_informix2.pgc"
181#line 64 "test_informix2.pgc"
184#line 64 "test_informix2.pgc"
187 {
ECPGdo(__LINE__, 1, 1, NULL, 0,
ECPGst_normal,
"create table history ( customerid integer , timestamp timestamp without time zone , action_taken char ( 5 ) , narrative varchar ( 100 ) )",
ECPGt_EOIT,
ECPGt_EORT);
188#line 66 "test_informix2.pgc"
191#line 66 "test_informix2.pgc"
195 {
ECPGdo(__LINE__, 1, 1, NULL, 0,
ECPGst_normal,
"insert into history ( customerid , timestamp , action_taken , narrative ) values ( 1 , '2003-05-07 13:28:34 CEST' , 'test' , 'test' )",
ECPGt_EOIT,
ECPGt_EORT);
196#line 71 "test_informix2.pgc"
199#line 71 "test_informix2.pgc"
206#line 76 "test_informix2.pgc"
209#line 76 "test_informix2.pgc"
213 {
ECPGdo(__LINE__, 1, 1, NULL, 0,
ECPGst_normal,
"select customerid , timestamp from history where timestamp = $1 limit 1",
220#line 83 "test_informix2.pgc"
223#line 83 "test_informix2.pgc"
227 printf(
"Read in customer %d\n",
c);
234 {
ECPGdo(__LINE__, 1, 1, NULL, 0,
ECPGst_normal,
"insert into history ( customerid , timestamp , action_taken , narrative ) values ( $1 , $2 , 'test' , 'test' )",
239#line 95 "test_informix2.pgc"
242#line 95 "test_informix2.pgc"
247#line 98 "test_informix2.pgc"
250#line 98 "test_informix2.pgc"
254#line 100 "test_informix2.pgc"
257#line 100 "test_informix2.pgc"
262#line 103 "test_informix2.pgc"
265#line 103 "test_informix2.pgc"
269#line 105 "test_informix2.pgc"
272#line 105 "test_informix2.pgc"
bool ECPGdisconnect(int lineno, const char *connection_name)
bool ECPGconnect(int lineno, int c, const char *name, const char *user, const char *passwd, const char *connection_name, int autocommit)
#define fprintf(file, fmt, msg)
bool ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query,...)
bool ECPGtrans(int lineno, const char *connection_name, const char *transaction)
interval * PGTYPESinterval_from_asc(char *str, char **endptr)
int PGTYPEStimestamp_add_interval(timestamp *tin, interval *span, timestamp *tout)
struct sqlca_t::@165 sqlerrm
char sqlerrmc[SQLERRMC_LEN]
static void * fn(void *arg)