54 struct bytea_1 {
int len;
char arr[ 512 ]; } send_buf [ 2 ] ;
57 struct bytea_2 {
int len;
char arr[
DATA_SIZE ]; } recv_buf [ 2 ] ;
60 struct bytea_3 {
int len;
char arr[
DATA_SIZE ]; } * recv_vlen_buf ;
73 for (i = 0; i < 2; ++i) \ 75 memset(recv_buf[i].arr, 0x0, sizeof(recv_buf[i].arr)); \ 76 recv_buf[i].len = 0; \ 79 recv_vlen_buf = NULL, \ 80 memset(recv_short_buf.arr, 0x0, sizeof(recv_short_buf.arr)); \ 86 for (i = 0; i < 2; ++
i)
88 for (j = 0, c = 0xff; (c == -1 ? c = 0xff : 1), j <
DATA_SIZE; ++j, --
c)
89 send_buf[i].arr[j] = c;
94 {
ECPGconnect(__LINE__, 0,
"ecpg1_regression" , NULL, NULL , NULL, 0);
108 {
ECPGprepare(__LINE__, NULL, 0,
"ins_stmt",
"insert into test values(?,?)");
114 {
ECPGprepare(__LINE__, NULL, 0,
"sel_stmt",
"select data1,data2 from test");
142 ECPGt_bytea,&(send_buf[0]),(
long)512,(
long)1,
sizeof(
struct bytea_1),
144 ECPGt_bytea,&(send_buf[1]),(
long)512,(
long)1,
sizeof(
struct bytea_1),
153 ECPGt_int,&(ind[0]),(
long)1,(
long)1,
sizeof(
int),
161 dump_binary(recv_buf[0].arr, recv_buf[0].len, ind[0]);
162 dump_binary(recv_short_buf.arr, recv_short_buf.len, ind[1]);
173 ECPGt_bytea,&(send_buf[0]),(
long)512,(
long)1,
sizeof(
struct bytea_1),
175 ECPGt_bytea,&(send_buf[1]),(
long)512,(
long)1,
sizeof(
struct bytea_1),
191 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"declare cursor1 cursor for select data1 from test where data1 = $1 ",
192 ECPGt_bytea,&(send_buf[0]),(
long)512,(
long)1,
sizeof(
struct bytea_1),
200 ECPGt_bytea,&(recv_buf[0]),(
long)DATA_SIZE,(
long)1,
sizeof(
struct bytea_2),
230 ECPGt_bytea,&(send_buf[0]),(
long)512,(
long)1,
sizeof(
struct bytea_1),
232 ECPGt_bytea,&(send_buf[1]),(
long)512,(
long)1,
sizeof(
struct bytea_1),
240 ECPGt_bytea,&(send_buf[0]),(
long)512,(
long)1,
sizeof(
struct bytea_1),
242 ECPGt_bytea,&(send_buf[1]),(
long)512,(
long)1,
sizeof(
struct bytea_1),
250 ECPGt_bytea,&(recv_vlen_buf),(
long)DATA_SIZE,(
long)0,
sizeof(
struct bytea_3),
257 dump_binary(recv_vlen_buf[0].arr, recv_vlen_buf[0].len, 0);
258 dump_binary(recv_vlen_buf[1].arr, recv_vlen_buf[1].len, 0);
270 ECPGt_bytea,&(send_buf[0]),(
long)512,(
long)1,
sizeof(
struct bytea_1),
272 ECPGt_bytea,&(send_buf[1]),(
long)512,(
long)1,
sizeof(
struct bytea_1),
280 ECPGt_bytea,&(recv_buf[0]),(
long)DATA_SIZE,(
long)1,
sizeof(
struct bytea_2),
281 ECPGt_int,&(ind[0]),(
long)1,(
long)1,
sizeof(
int),
289 dump_binary(recv_buf[0].arr, recv_buf[0].len, ind[0]);
290 dump_binary(recv_short_buf.arr, recv_short_buf.len, ind[1]);
295 #line 105 "bytea.pgc" 298 #line 105 "bytea.pgc" 303 #line 106 "bytea.pgc" 306 #line 106 "bytea.pgc" 311 #line 107 "bytea.pgc" 314 #line 107 "bytea.pgc" 319 #line 108 "bytea.pgc" 322 #line 108 "bytea.pgc" 327 #line 109 "bytea.pgc" 330 #line 109 "bytea.pgc" 336 #line 110 "bytea.pgc" 339 #line 110 "bytea.pgc" 345 #line 111 "bytea.pgc" 348 #line 111 "bytea.pgc" 350 dump_binary(recv_buf[0].arr, recv_buf[0].len, ind[0]);
351 dump_binary(recv_short_buf.arr, recv_short_buf.len, ind[1]);
354 #line 115 "bytea.pgc" 357 #line 115 "bytea.pgc" 360 #line 116 "bytea.pgc" 363 #line 116 "bytea.pgc" 366 #line 117 "bytea.pgc" 369 #line 117 "bytea.pgc"
bool ECPGdisconnect(int lineno, const char *connection_name)
bool ECPGallocate_desc(int line, const char *name)
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 ECPGprepare(int lineno, const char *connection_name, const bool questionmarks, const char *name, const char *variable)
void ECPGset_var(int number, void *pointer, int lineno)
bool ECPGconnect(int lineno, int c, const char *name, const char *user, const char *passwd, const char *connection_name, int autocommit)
bool ECPGget_desc(int lineno, const char *desc_name, int index,...)
bool ECPGdeallocate(int lineno, int c, const char *connection_name, const char *name)
bool ECPGtrans(int lineno, const char *connection_name, const char *transaction)
bool ECPGset_desc(int lineno, const char *desc_name, int index,...)
static void dump_binary(char *buf, int len, int ind)