66 char * stmt1 =
"SELECT id, t FROM t1" ;
78 struct varchar_1 {
int len;
char arr[ 50 ]; } curname4 ;
99 strcpy(msg,
"connect");
100 {
ECPGconnect(__LINE__, 0,
"ecpg1_regression" , NULL, NULL ,
"test1", 0);
101 #line 39 "cursor.pgc"
104 #line 39 "cursor.pgc"
106 {
ECPGconnect(__LINE__, 0,
"ecpg2_regression" , NULL, NULL ,
"test2", 0);
107 #line 40 "cursor.pgc"
110 #line 40 "cursor.pgc"
115 #line 43 "cursor.pgc"
118 #line 43 "cursor.pgc"
121 strcpy(msg,
"create");
123 #line 46 "cursor.pgc"
126 #line 46 "cursor.pgc"
129 #line 47 "cursor.pgc"
132 #line 47 "cursor.pgc"
135 strcpy(msg,
"insert");
136 {
ECPGdo(__LINE__, 0, 1,
"test1", 0,
ECPGst_normal,
"insert into t1 ( id , t ) values ( default , 'a' )",
ECPGt_EOIT,
ECPGt_EORT);
137 #line 50 "cursor.pgc"
140 #line 50 "cursor.pgc"
142 {
ECPGdo(__LINE__, 0, 1,
"test1", 0,
ECPGst_normal,
"insert into t1 ( id , t ) values ( default , 'b' )",
ECPGt_EOIT,
ECPGt_EORT);
143 #line 51 "cursor.pgc"
146 #line 51 "cursor.pgc"
148 {
ECPGdo(__LINE__, 0, 1,
"test1", 0,
ECPGst_normal,
"insert into t1 ( id , t ) values ( default , 'c' )",
ECPGt_EOIT,
ECPGt_EORT);
149 #line 52 "cursor.pgc"
152 #line 52 "cursor.pgc"
154 {
ECPGdo(__LINE__, 0, 1,
"test1", 0,
ECPGst_normal,
"insert into t1 ( id , t ) values ( default , 'd' )",
ECPGt_EOIT,
ECPGt_EORT);
155 #line 53 "cursor.pgc"
158 #line 53 "cursor.pgc"
160 {
ECPGdo(__LINE__, 0, 1,
"test2", 0,
ECPGst_normal,
"insert into t1 ( id , t ) values ( default , 'e' )",
ECPGt_EOIT,
ECPGt_EORT);
161 #line 54 "cursor.pgc"
164 #line 54 "cursor.pgc"
167 strcpy(msg,
"commit");
168 {
ECPGtrans(__LINE__,
"test1",
"commit");
169 #line 57 "cursor.pgc"
172 #line 57 "cursor.pgc"
174 {
ECPGtrans(__LINE__,
"test2",
"commit");
175 #line 58 "cursor.pgc"
178 #line 58 "cursor.pgc"
183 strcpy(msg,
"declare");
186 #line 64 "cursor.pgc"
189 #line 64 "cursor.pgc"
191 #line 64 "cursor.pgc"
195 {
ECPGdo(__LINE__, 0, 1,
"test1", 0,
ECPGst_normal,
"declare $0 cursor for select id , t from t1",
196 ECPGt_char,&(curname1),(
long)0,(
long)1,(1)*
sizeof(
char),
198 #line 67 "cursor.pgc"
201 #line 67 "cursor.pgc"
204 strcpy(msg,
"fetch from");
206 ECPGt_char,&(curname1),(
long)0,(
long)1,(1)*
sizeof(
char),
208 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
210 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
212 #line 70 "cursor.pgc"
215 #line 70 "cursor.pgc"
219 strcpy(msg,
"fetch");
221 ECPGt_char,&(curname1),(
long)0,(
long)1,(1)*
sizeof(
char),
223 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
225 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
227 #line 74 "cursor.pgc"
230 #line 74 "cursor.pgc"
234 strcpy(msg,
"fetch 1 from");
236 ECPGt_char,&(curname1),(
long)0,(
long)1,(1)*
sizeof(
char),
238 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
240 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
242 #line 78 "cursor.pgc"
245 #line 78 "cursor.pgc"
249 strcpy(msg,
"fetch :count from");
252 ECPGt_int,&(count),(
long)1,(
long)1,
sizeof(
int),
254 ECPGt_char,&(curname1),(
long)0,(
long)1,(1)*
sizeof(
char),
256 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
258 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
260 #line 83 "cursor.pgc"
263 #line 83 "cursor.pgc"
267 strcpy(msg,
"move in");
269 ECPGt_char,&(curname1),(
long)0,(
long)1,(1)*
sizeof(
char),
271 #line 87 "cursor.pgc"
274 #line 87 "cursor.pgc"
277 strcpy(msg,
"fetch 1");
279 ECPGt_char,&(curname1),(
long)0,(
long)1,(1)*
sizeof(
char),
281 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
283 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
285 #line 90 "cursor.pgc"
288 #line 90 "cursor.pgc"
292 strcpy(msg,
"fetch :count");
295 ECPGt_int,&(count),(
long)1,(
long)1,
sizeof(
int),
297 ECPGt_char,&(curname1),(
long)0,(
long)1,(1)*
sizeof(
char),
299 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
301 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
303 #line 95 "cursor.pgc"
306 #line 95 "cursor.pgc"
310 strcpy(msg,
"close");
312 ECPGt_char,&(curname1),(
long)0,(
long)1,(1)*
sizeof(
char),
314 #line 99 "cursor.pgc"
317 #line 99 "cursor.pgc"
322 strcpy(msg,
"declare");
324 ECPGset_var( 2, ( t ), __LINE__);\
325 ECPGset_var( 3, &(
id ), __LINE__);\
327 #line 105 "cursor.pgc"
330 #line 105 "cursor.pgc"
332 #line 105 "cursor.pgc"
336 {
ECPGdo(__LINE__, 0, 1,
"test1", 0,
ECPGst_normal,
"declare $0 cursor for select id , t from t1",
337 ECPGt_char,&(curname2),(
long)0,(
long)1,(1)*
sizeof(
char),
339 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
341 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
343 #line 108 "cursor.pgc"
346 #line 108 "cursor.pgc"
349 strcpy(msg,
"fetch from");
351 ECPGt_char,&(curname2),(
long)0,(
long)1,(1)*
sizeof(
char),
353 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
355 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
357 #line 111 "cursor.pgc"
360 #line 111 "cursor.pgc"
364 strcpy(msg,
"fetch");
366 ECPGt_char,&(curname2),(
long)0,(
long)1,(1)*
sizeof(
char),
368 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
370 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
372 #line 115 "cursor.pgc"
375 #line 115 "cursor.pgc"
379 strcpy(msg,
"fetch 1 from");
381 ECPGt_char,&(curname2),(
long)0,(
long)1,(1)*
sizeof(
char),
383 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
385 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
387 #line 119 "cursor.pgc"
390 #line 119 "cursor.pgc"
394 strcpy(msg,
"fetch :count from");
397 ECPGt_int,&(count),(
long)1,(
long)1,
sizeof(
int),
399 ECPGt_char,&(curname2),(
long)0,(
long)1,(1)*
sizeof(
char),
401 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
403 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
405 #line 124 "cursor.pgc"
408 #line 124 "cursor.pgc"
414 ECPGt_char,&(curname2),(
long)0,(
long)1,(1)*
sizeof(
char),
416 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
418 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
420 #line 128 "cursor.pgc"
423 #line 128 "cursor.pgc"
426 strcpy(msg,
"fetch 1");
428 ECPGt_char,&(curname2),(
long)0,(
long)1,(1)*
sizeof(
char),
430 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
432 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
434 #line 131 "cursor.pgc"
437 #line 131 "cursor.pgc"
441 strcpy(msg,
"fetch :count");
444 ECPGt_int,&(count),(
long)1,(
long)1,
sizeof(
int),
446 ECPGt_char,&(curname2),(
long)0,(
long)1,(1)*
sizeof(
char),
448 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
450 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
452 #line 136 "cursor.pgc"
455 #line 136 "cursor.pgc"
459 strcpy(msg,
"close");
461 ECPGt_char,&(curname2),(
long)0,(
long)1,(1)*
sizeof(
char),
463 #line 140 "cursor.pgc"
466 #line 140 "cursor.pgc"
471 strcpy(msg,
"prepare");
472 {
ECPGprepare(__LINE__,
"test1", 0,
"st_id1", stmt1);
473 #line 145 "cursor.pgc"
476 #line 145 "cursor.pgc"
478 {
ECPGprepare(__LINE__,
"test2", 0,
"st_id1", stmt1);
479 #line 146 "cursor.pgc"
482 #line 146 "cursor.pgc"
485 strcpy(msg,
"declare");
488 #line 149 "cursor.pgc"
491 #line 149 "cursor.pgc"
493 #line 149 "cursor.pgc"
497 #line 150 "cursor.pgc"
500 #line 150 "cursor.pgc"
502 #line 150 "cursor.pgc"
507 ECPGt_char,&(curname3),(
long)0,(
long)1,(1)*
sizeof(
char),
511 #line 153 "cursor.pgc"
514 #line 153 "cursor.pgc"
517 ECPGt_char,&(curname5),(
long)0,(
long)1,(1)*
sizeof(
char),
521 #line 154 "cursor.pgc"
524 #line 154 "cursor.pgc"
527 strcpy(msg,
"fetch");
529 ECPGt_char,&(curname5),(
long)0,(
long)1,(1)*
sizeof(
char),
531 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
533 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
535 #line 157 "cursor.pgc"
538 #line 157 "cursor.pgc"
542 strcpy(msg,
"fetch from");
544 ECPGt_char,&(curname3),(
long)0,(
long)1,(1)*
sizeof(
char),
546 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
548 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
550 #line 161 "cursor.pgc"
553 #line 161 "cursor.pgc"
557 strcpy(msg,
"fetch 1 from");
559 ECPGt_char,&(curname3),(
long)0,(
long)1,(1)*
sizeof(
char),
561 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
563 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
565 #line 165 "cursor.pgc"
568 #line 165 "cursor.pgc"
572 strcpy(msg,
"fetch :count from");
575 ECPGt_int,&(count),(
long)1,(
long)1,
sizeof(
int),
577 ECPGt_char,&(curname3),(
long)0,(
long)1,(1)*
sizeof(
char),
579 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
581 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
583 #line 170 "cursor.pgc"
586 #line 170 "cursor.pgc"
592 ECPGt_char,&(curname3),(
long)0,(
long)1,(1)*
sizeof(
char),
594 #line 174 "cursor.pgc"
597 #line 174 "cursor.pgc"
600 strcpy(msg,
"fetch 1");
602 ECPGt_char,&(curname3),(
long)0,(
long)1,(1)*
sizeof(
char),
604 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
606 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
608 #line 177 "cursor.pgc"
611 #line 177 "cursor.pgc"
615 strcpy(msg,
"fetch :count");
618 ECPGt_int,&(count),(
long)1,(
long)1,
sizeof(
int),
620 ECPGt_char,&(curname3),(
long)0,(
long)1,(1)*
sizeof(
char),
622 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
624 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
626 #line 182 "cursor.pgc"
629 #line 182 "cursor.pgc"
633 strcpy(msg,
"close");
635 ECPGt_char,&(curname3),(
long)0,(
long)1,(1)*
sizeof(
char),
637 #line 186 "cursor.pgc"
640 #line 186 "cursor.pgc"
643 ECPGt_char,&(curname5),(
long)0,(
long)1,(1)*
sizeof(
char),
645 #line 187 "cursor.pgc"
648 #line 187 "cursor.pgc"
651 strcpy(msg,
"deallocate prepare");
653 #line 190 "cursor.pgc"
656 #line 190 "cursor.pgc"
659 #line 191 "cursor.pgc"
662 #line 191 "cursor.pgc"
668 curname4.len = strlen(
CURNAME);
671 strcpy(msg,
"prepare");
672 {
ECPGprepare(__LINE__,
"test1", 0,
"st_id2", stmt1);
673 #line 200 "cursor.pgc"
676 #line 200 "cursor.pgc"
679 strcpy(msg,
"declare");
682 #line 203 "cursor.pgc"
685 #line 203 "cursor.pgc"
687 #line 203 "cursor.pgc"
692 ECPGt_varchar,&(curname4),(
long)50,(
long)1,
sizeof(
struct varchar_1),
696 #line 206 "cursor.pgc"
699 #line 206 "cursor.pgc"
702 strcpy(msg,
"fetch from");
704 ECPGt_varchar,&(curname4),(
long)50,(
long)1,
sizeof(
struct varchar_1),
706 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
708 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
710 #line 209 "cursor.pgc"
713 #line 209 "cursor.pgc"
717 strcpy(msg,
"fetch");
719 ECPGt_varchar,&(curname4),(
long)50,(
long)1,
sizeof(
struct varchar_1),
721 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
723 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
725 #line 213 "cursor.pgc"
728 #line 213 "cursor.pgc"
732 strcpy(msg,
"fetch 1 from");
734 ECPGt_varchar,&(curname4),(
long)50,(
long)1,
sizeof(
struct varchar_1),
736 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
738 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
740 #line 217 "cursor.pgc"
743 #line 217 "cursor.pgc"
747 strcpy(msg,
"fetch :count from");
750 ECPGt_int,&(count),(
long)1,(
long)1,
sizeof(
int),
752 ECPGt_varchar,&(curname4),(
long)50,(
long)1,
sizeof(
struct varchar_1),
754 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
756 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
758 #line 222 "cursor.pgc"
761 #line 222 "cursor.pgc"
767 ECPGt_varchar,&(curname4),(
long)50,(
long)1,
sizeof(
struct varchar_1),
769 #line 226 "cursor.pgc"
772 #line 226 "cursor.pgc"
775 strcpy(msg,
"fetch 1");
777 ECPGt_varchar,&(curname4),(
long)50,(
long)1,
sizeof(
struct varchar_1),
779 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
781 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
783 #line 229 "cursor.pgc"
786 #line 229 "cursor.pgc"
790 strcpy(msg,
"fetch :count");
793 ECPGt_int,&(count),(
long)1,(
long)1,
sizeof(
int),
795 ECPGt_varchar,&(curname4),(
long)50,(
long)1,
sizeof(
struct varchar_1),
797 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
799 ECPGt_char,(t),(
long)64,(
long)1,(64)*
sizeof(
char),
801 #line 234 "cursor.pgc"
804 #line 234 "cursor.pgc"
808 strcpy(msg,
"close");
810 ECPGt_varchar,&(curname4),(
long)50,(
long)1,
sizeof(
struct varchar_1),
812 #line 238 "cursor.pgc"
815 #line 238 "cursor.pgc"
818 strcpy(msg,
"deallocate prepare");
820 #line 241 "cursor.pgc"
823 #line 241 "cursor.pgc"
830 #line 246 "cursor.pgc"
833 #line 246 "cursor.pgc"
836 #line 247 "cursor.pgc"
839 #line 247 "cursor.pgc"
842 strcpy(msg,
"commit");
843 {
ECPGtrans(__LINE__,
"test1",
"commit");
844 #line 250 "cursor.pgc"
847 #line 250 "cursor.pgc"
850 strcpy(msg,
"disconnect");
852 #line 253 "cursor.pgc"
855 #line 253 "cursor.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)
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,...)
void ECPGset_var(int number, void *pointer, int lineno)
bool ECPGtrans(int lineno, const char *connection_name, const char *transaction)
bool ECPGprepare(int lineno, const char *connection_name, const bool questionmarks, const char *name, const char *variable)
char * ECPGprepared_statement(const char *connection_name, const char *name, int lineno)
bool ECPGdeallocate(int lineno, int c, const char *connection_name, const char *name)