7#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
20#ifndef POSTGRES_SQLCA_H
21#define POSTGRES_SQLCA_H
24#if defined(WIN32) || defined(__CYGWIN__)
25#define PGDLLIMPORT __declspec (dllimport)
31#define SQLERRMC_LEN 150
77#ifndef POSTGRES_ECPG_INTERNAL
78#define sqlca (*ECPGget_sqlca())
112#line 18 "declare.pgc"
115#line 19 "declare.pgc"
118#line 20 "declare.pgc"
121#line 21 "declare.pgc"
130 {
ECPGconnect(__LINE__, 0,
"ecpg1_regression" , NULL, NULL ,
"con1", 0);
131#line 29 "declare.pgc"
134#line 29 "declare.pgc"
136 {
ECPGconnect(__LINE__, 0,
"ecpg2_regression" , NULL, NULL ,
"con2", 0);
137#line 30 "declare.pgc"
140#line 30 "declare.pgc"
143 {
ECPGdo(__LINE__, 0, 1,
"con1", 0,
ECPGst_normal,
"create table source ( f1 integer , f2 integer , f3 varchar ( 20 ) )",
ECPGt_EOIT,
ECPGt_EORT);
144#line 32 "declare.pgc"
147#line 32 "declare.pgc"
149 {
ECPGdo(__LINE__, 0, 1,
"con2", 0,
ECPGst_normal,
"create table source ( f1 integer , f2 integer , f3 varchar ( 20 ) )",
ECPGt_EOIT,
ECPGt_EORT);
150#line 33 "declare.pgc"
153#line 33 "declare.pgc"
156 {
ECPGdo(__LINE__, 0, 1,
"con1", 0,
ECPGst_normal,
"insert into source values ( 1 , 10 , 'db on con1' )",
ECPGt_EOIT,
ECPGt_EORT);
157#line 35 "declare.pgc"
160#line 35 "declare.pgc"
162 {
ECPGdo(__LINE__, 0, 1,
"con1", 0,
ECPGst_normal,
"insert into source values ( 2 , 20 , 'db on con1' )",
ECPGt_EOIT,
ECPGt_EORT);
163#line 36 "declare.pgc"
166#line 36 "declare.pgc"
169 {
ECPGdo(__LINE__, 0, 1,
"con2", 0,
ECPGst_normal,
"insert into source values ( 1 , 10 , 'db on con2' )",
ECPGt_EOIT,
ECPGt_EORT);
170#line 38 "declare.pgc"
173#line 38 "declare.pgc"
175 {
ECPGdo(__LINE__, 0, 1,
"con2", 0,
ECPGst_normal,
"insert into source values ( 2 , 20 , 'db on con2' )",
ECPGt_EOIT,
ECPGt_EORT);
176#line 39 "declare.pgc"
179#line 39 "declare.pgc"
187#line 45 "declare.pgc"
190#line 45 "declare.pgc"
193#line 46 "declare.pgc"
196#line 46 "declare.pgc"
202#line 50 "declare.pgc"
205#line 50 "declare.pgc"
222#line 63 "declare.pgc"
223 int i , count , length ;
225#line 64 "declare.pgc"
226 char * selectString =
"SELECT f1,f2,f3 FROM source" ;
228#line 65 "declare.pgc"
238#line 73 "declare.pgc"
240 {
ECPGprepare(__LINE__, NULL, 0,
"stmt_1", selectString);
241#line 74 "declare.pgc"
244#line 74 "declare.pgc"
247#line 75 "declare.pgc"
252#line 76 "declare.pgc"
255#line 76 "declare.pgc"
259#line 78 "declare.pgc"
271#line 82 "declare.pgc"
274#line 82 "declare.pgc"
277#line 82 "declare.pgc"
282#line 85 "declare.pgc"
285#line 85 "declare.pgc"
288#line 86 "declare.pgc"
291#line 86 "declare.pgc"
294#line 87 "declare.pgc"
307#line 98 "declare.pgc"
309 {
ECPGprepare(__LINE__,
"con1", 0,
"stmt_2", selectString);
310#line 99 "declare.pgc"
313#line 99 "declare.pgc"
316#line 100 "declare.pgc"
321#line 101 "declare.pgc"
324#line 101 "declare.pgc"
328#line 103 "declare.pgc"
340#line 107 "declare.pgc"
343#line 107 "declare.pgc"
346#line 107 "declare.pgc"
351#line 110 "declare.pgc"
354#line 110 "declare.pgc"
357#line 111 "declare.pgc"
360#line 111 "declare.pgc"
363#line 112 "declare.pgc"
375#line 122 "declare.pgc"
377 {
ECPGprepare(__LINE__, NULL, 0,
"stmt_3", selectString);
378#line 123 "declare.pgc"
381#line 123 "declare.pgc"
390#line 124 "declare.pgc"
393#line 124 "declare.pgc"
397#line 126 "declare.pgc"
400#line 126 "declare.pgc"
412#line 136 "declare.pgc"
414 {
ECPGprepare(__LINE__,
"con2", 0,
"stmt_4", selectString);
415#line 137 "declare.pgc"
418#line 137 "declare.pgc"
421#line 138 "declare.pgc"
426#line 139 "declare.pgc"
429#line 139 "declare.pgc"
433#line 141 "declare.pgc"
445#line 145 "declare.pgc"
448#line 145 "declare.pgc"
451#line 145 "declare.pgc"
456#line 148 "declare.pgc"
459#line 148 "declare.pgc"
462#line 149 "declare.pgc"
465#line 149 "declare.pgc"
468#line 150 "declare.pgc"
477#line 157 "declare.pgc"
479 {
ECPGprepare(__LINE__,
"con1", 0,
"stmt_desc", selectString);
480#line 158 "declare.pgc"
483#line 158 "declare.pgc"
486#line 159 "declare.pgc"
491#line 160 "declare.pgc"
494#line 160 "declare.pgc"
499#line 163 "declare.pgc"
502#line 163 "declare.pgc"
507#line 164 "declare.pgc"
512#line 166 "declare.pgc"
515#line 166 "declare.pgc"
520#line 167 "declare.pgc"
523#line 167 "declare.pgc"
527#line 169 "declare.pgc"
530#line 169 "declare.pgc"
535#line 172 "declare.pgc"
538#line 172 "declare.pgc"
543#line 173 "declare.pgc"
546#line 173 "declare.pgc"
552#line 175 "declare.pgc"
555#line 175 "declare.pgc"
559#line 177 "declare.pgc"
562#line 177 "declare.pgc"
565#line 178 "declare.pgc"
568#line 178 "declare.pgc"
571#line 179 "declare.pgc"
574#line 179 "declare.pgc"
577 printf(
"****descriptor results****\n");
578 printf(
"count: %d, length: %d, data: %s\n", count, length,
f3[0]);
584#line 187 "declare.pgc"
587#line 187 "declare.pgc"
590#line 188 "declare.pgc"
593#line 188 "declare.pgc"
602 memset(
f1, 0,
sizeof(
f1));
603 memset(
f2, 0,
sizeof(
f2));
604 memset(
f3, 0,
sizeof(
f3));
612 printf(
"****%s test results:****\n", tc_name);
614 for (
i = 0;
i < loop;
i++)
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)
bool ECPGdeallocate_desc(int line, const char *name)
bool ECPGget_desc(int lineno, const char *desc_name, int index,...)
bool ECPGallocate_desc(int line, const char *name)
bool ECPGdescribe(int line, int compat, bool input, const char *connection_name, const char *stmt_name,...)
bool ECPGget_desc_header(int lineno, const char *desc_name, int *count)
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)
char * ECPGprepared_statement(const char *connection_name, const char *name, int lineno)
bool ECPGprepare(int lineno, const char *connection_name, const bool questionmarks, const char *name, const char *variable)
bool ECPGdeallocate(int lineno, int c, const char *connection_name, const char *name)
struct sqlca_t * ECPGget_sqlca(void)
void printResult(char *tc_name, int loop)
struct sqlca_t::@165 sqlerrm
char sqlerrmc[SQLERRMC_LEN]