30{
31
32
33
34
35
36
37#line 14 "nan_test.pgc"
39
40#line 15 "nan_test.pgc"
41 double d ;
42
43#line 16 "nan_test.pgc"
45
46#line 17 "nan_test.pgc"
48
49#line 18 "nan_test.pgc"
50
51
53
54#line 21 "nan_test.pgc"
55
56
58#line 23 "nan_test.pgc"
59
61#line 23 "nan_test.pgc"
62
63
65#line 25 "nan_test.pgc"
66
68#line 25 "nan_test.pgc"
69
70 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"insert into nantest1 ( id , d ) values ( 1 , 'nan' :: float8 ) , ( 2 , 'infinity' :: float8 ) , ( 3 , '-infinity' :: float8 )",
ECPGt_EOIT,
ECPGt_EORT);
71#line 26 "nan_test.pgc"
72
74#line 26 "nan_test.pgc"
75
76
77
78#line 28 "nan_test.pgc"
79
80 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"declare cur cursor for select id , d , d from nantest1",
ECPGt_EOIT,
ECPGt_EORT);
81#line 29 "nan_test.pgc"
82
84#line 29 "nan_test.pgc"
85
87 {
89 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
95#line 32 "nan_test.pgc"
96
98#line 32 "nan_test.pgc"
99
101 break;
105 printf(
"%d %sInf '%s'\n",
id, (d < 0 ?
"-" :
"+"),
val);
106
108 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
112#line 40 "nan_test.pgc"
113
115#line 40 "nan_test.pgc"
116
118 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
122#line 41 "nan_test.pgc"
123
125#line 41 "nan_test.pgc"
126
127 }
129#line 43 "nan_test.pgc"
130
132#line 43 "nan_test.pgc"
133
134
135 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"declare cur cursor for select id , d , d from nantest1",
ECPGt_EOIT,
ECPGt_EORT);
136#line 45 "nan_test.pgc"
137
139#line 45 "nan_test.pgc"
140
142 {
144 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
150#line 48 "nan_test.pgc"
151
153#line 48 "nan_test.pgc"
154
156 break;
158 printf(
"%d %sInf '%s'\n",
id, (d < 0 ?
"-" :
"+"),
val);
161 }
163#line 56 "nan_test.pgc"
164
166#line 56 "nan_test.pgc"
167
168
170
172#line 60 "nan_test.pgc"
173
175#line 60 "nan_test.pgc"
176
177 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"insert into nantest2 ( id , d ) values ( 4 , 'nan' :: numeric )",
ECPGt_EOIT,
ECPGt_EORT);
178#line 61 "nan_test.pgc"
179
181#line 61 "nan_test.pgc"
182
183
184 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"select id , d , d from nantest2 where id = 4",
ECPGt_EOIT,
185 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
191#line 63 "nan_test.pgc"
192
194#line 63 "nan_test.pgc"
195
196
198
202#line 67 "nan_test.pgc"
203
205#line 67 "nan_test.pgc"
206
210#line 68 "nan_test.pgc"
211
213#line 68 "nan_test.pgc"
214
215
216
217#line 70 "nan_test.pgc"
218
219 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"declare cur1 cursor for select id , d , d from nantest2",
ECPGt_EOIT,
ECPGt_EORT);
220#line 71 "nan_test.pgc"
221
223#line 71 "nan_test.pgc"
224
226 {
228 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
234#line 74 "nan_test.pgc"
235
237#line 74 "nan_test.pgc"
238
240 break;
242 }
244#line 79 "nan_test.pgc"
245
247#line 79 "nan_test.pgc"
248
249
251
253#line 83 "nan_test.pgc"
254
256#line 83 "nan_test.pgc"
257
259#line 84 "nan_test.pgc"
260
262#line 84 "nan_test.pgc"
263
264
265 return 0;
266}
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,...)
bool ECPGtrans(int lineno, const char *connection_name, const char *transaction)
numeric * PGTYPESnumeric_new(void)
void PGTYPESnumeric_free(numeric *var)