26{
27
28
29
30
31
32
33
34
35
36
37
38
39#line 8 "desc.pgc"
40 char * stmt1 = "INSERT INTO test1 VALUES ($1, $2)" ;
41
42#line 9 "desc.pgc"
43 char * stmt2 = "SELECT * from test1 where a = $1 and b = $2" ;
44
45#line 10 "desc.pgc"
46 char * stmt3 = "SELECT * from test1 where :var = a" ;
47
48#line 12 "desc.pgc"
49 int val1 = 1 ;
50
51#line 13 "desc.pgc"
52 char val2 [ 4 ] = "one" , val2output [] = "AAA" ;
53
54#line 14 "desc.pgc"
55 int val1output = 2 , val2i = 0 ;
56
57#line 15 "desc.pgc"
58 int val2null = - 1 ;
59
60#line 16 "desc.pgc"
61 int ind1 , ind2 ;
62
63#line 17 "desc.pgc"
64 char desc1 [ 8 ] = "outdesc" ;
65
66#line 18 "desc.pgc"
67
68
70
72#line 22 "desc.pgc"
73
75#line 22 "desc.pgc"
76
78#line 23 "desc.pgc"
79
81#line 23 "desc.pgc"
82
83
86
87#line 25 "desc.pgc"
88
90#line 25 "desc.pgc"
91
95
96#line 26 "desc.pgc"
97
99#line 26 "desc.pgc"
100
101
102 {
ECPGconnect(__LINE__, 0,
"ecpg1_regression" , NULL, NULL , NULL, 0);
103#line 28 "desc.pgc"
104
106#line 28 "desc.pgc"
107
108
110#line 30 "desc.pgc"
111
113#line 30 "desc.pgc"
114
116#line 31 "desc.pgc"
117
119#line 31 "desc.pgc"
120
122#line 32 "desc.pgc"
123
125#line 32 "desc.pgc"
126
128#line 33 "desc.pgc"
129
131#line 33 "desc.pgc"
132
134#line 34 "desc.pgc"
135
137#line 34 "desc.pgc"
138
139
143#line 36 "desc.pgc"
144
146#line 36 "desc.pgc"
147
148
151
152#line 38 "desc.pgc"
153
155#line 38 "desc.pgc"
156
160
161#line 39 "desc.pgc"
162
164#line 39 "desc.pgc"
165
166
170#line 41 "desc.pgc"
171
173#line 41 "desc.pgc"
174
175
178
179#line 43 "desc.pgc"
180
182#line 43 "desc.pgc"
183
187
188#line 44 "desc.pgc"
189
191#line 44 "desc.pgc"
192
193
197#line 46 "desc.pgc"
198
200#line 46 "desc.pgc"
201
202
204#line 48 "desc.pgc"
205
207#line 48 "desc.pgc"
208
209
212
213#line 50 "desc.pgc"
214
216#line 50 "desc.pgc"
217
221
222#line 51 "desc.pgc"
223
225#line 51 "desc.pgc"
226
227
233#line 53 "desc.pgc"
234
236#line 53 "desc.pgc"
237
238
241
242#line 55 "desc.pgc"
243
245#line 55 "desc.pgc"
246
247 printf(
"output = %s\n", val2output);
248
249
250#line 58 "desc.pgc"
251
257#line 59 "desc.pgc"
258
260#line 59 "desc.pgc"
261
262
264 ECPGt_int,&(val1output),(
long)1,(
long)1,
sizeof(
int),
265 ECPGt_int,&(ind1),(
long)1,(
long)1,
sizeof(
int),
266 ECPGt_char,(val2output),(
long)
sizeof(
"AAA"),(
long)1,(
sizeof(
"AAA"))*
sizeof(
char),
268#line 61 "desc.pgc"
269
271#line 61 "desc.pgc"
272
273 printf(
"val1=%d (ind1: %d) val2=%s (ind2: %d)\n",
274 val1output, ind1, val2output, ind2);
275
277#line 65 "desc.pgc"
278
280#line 65 "desc.pgc"
281
282
284
285#line 67 "desc.pgc"
286
288#line 67 "desc.pgc"
289
292
293#line 68 "desc.pgc"
294
296#line 68 "desc.pgc"
297
298
299
300#line 70 "desc.pgc"
301
307#line 71 "desc.pgc"
308
310#line 71 "desc.pgc"
311
312
314 ECPGt_int,&(val1output),(
long)1,(
long)1,
sizeof(
int),
316 ECPGt_char,(val2output),(
long)
sizeof(
"AAA"),(
long)1,(
sizeof(
"AAA"))*
sizeof(
char),
318#line 73 "desc.pgc"
319
321#line 73 "desc.pgc"
322
323 printf(
"val1=%d val2=%s\n", val1output, val2i ?
"null" : val2output);
324
326#line 76 "desc.pgc"
327
329#line 76 "desc.pgc"
330
331
333 ECPGt_int,&(val1output),(
long)1,(
long)1,
sizeof(
int),
335 ECPGt_char,(val2output),(
long)
sizeof(
"AAA"),(
long)1,(
sizeof(
"AAA"))*
sizeof(
char),
337#line 78 "desc.pgc"
338
340#line 78 "desc.pgc"
341
342 printf(
"val1=%d val2=%c%c%c%c warn=%c truncate=%d\n", val1output, val2output[0], val2output[1], val2output[2], val2output[3],
sqlca.sqlwarn[0], val2i);
343
345#line 81 "desc.pgc"
346
348#line 81 "desc.pgc"
349
351#line 82 "desc.pgc"
352
354#line 82 "desc.pgc"
355
357#line 83 "desc.pgc"
358
360#line 83 "desc.pgc"
361
362
364#line 85 "desc.pgc"
365
367#line 85 "desc.pgc"
368
370#line 86 "desc.pgc"
371
373#line 86 "desc.pgc"
374
375
376 return 0;
377}
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 ECPGset_desc_header(int lineno, const char *desc_name, int count)
bool ECPGset_desc(int lineno, const char *desc_name, int index,...)
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 ECPGdeallocate_all(int lineno, int compat, const char *connection_name)
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)