7 #define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
18 #line 1 "regression.h"
25 #line 8 "nan_test.pgc"
37 #line 14 "nan_test.pgc"
40 #line 15 "nan_test.pgc"
43 #line 16 "nan_test.pgc"
46 #line 17 "nan_test.pgc"
49 #line 18 "nan_test.pgc"
54 #line 21 "nan_test.pgc"
57 {
ECPGconnect(__LINE__, 0,
"ecpg1_regression" , NULL, NULL , NULL, 0);
58 #line 23 "nan_test.pgc"
61 #line 23 "nan_test.pgc"
65 #line 25 "nan_test.pgc"
68 #line 25 "nan_test.pgc"
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"
74 #line 26 "nan_test.pgc"
78 #line 28 "nan_test.pgc"
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"
84 #line 29 "nan_test.pgc"
86 for (loopcount = 0; loopcount < 100; loopcount++)
89 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
95 #line 32 "nan_test.pgc"
98 #line 32 "nan_test.pgc"
105 printf(
"%d %sInf '%s'\n",
id, (d < 0 ?
"-" :
"+"),
val);
107 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"insert into nantest1 ( id , d ) values ( $1 + 3 , $2 )",
108 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
112 #line 40 "nan_test.pgc"
115 #line 40 "nan_test.pgc"
117 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"insert into nantest1 ( id , d ) values ( $1 + 6 , $2 )",
118 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
122 #line 41 "nan_test.pgc"
125 #line 41 "nan_test.pgc"
129 #line 43 "nan_test.pgc"
132 #line 43 "nan_test.pgc"
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"
139 #line 45 "nan_test.pgc"
141 for (loopcount = 0; loopcount < 100; loopcount++)
144 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
150 #line 48 "nan_test.pgc"
153 #line 48 "nan_test.pgc"
158 printf(
"%d %sInf '%s'\n",
id, (d < 0 ?
"-" :
"+"),
val);
163 #line 56 "nan_test.pgc"
166 #line 56 "nan_test.pgc"
172 #line 60 "nan_test.pgc"
175 #line 60 "nan_test.pgc"
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"
181 #line 61 "nan_test.pgc"
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"
194 #line 63 "nan_test.pgc"
199 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"insert into nantest2 ( id , d ) values ( 5 , $1 )",
202 #line 67 "nan_test.pgc"
205 #line 67 "nan_test.pgc"
207 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"insert into nantest2 ( id , d ) values ( 6 , $1 )",
210 #line 68 "nan_test.pgc"
213 #line 68 "nan_test.pgc"
217 #line 70 "nan_test.pgc"
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"
223 #line 71 "nan_test.pgc"
225 for (loopcount = 0; loopcount < 100; loopcount++)
228 ECPGt_int,&(
id),(
long)1,(
long)1,
sizeof(
int),
234 #line 74 "nan_test.pgc"
237 #line 74 "nan_test.pgc"
244 #line 79 "nan_test.pgc"
247 #line 79 "nan_test.pgc"
253 #line 83 "nan_test.pgc"
256 #line 83 "nan_test.pgc"
259 #line 84 "nan_test.pgc"
262 #line 84 "nan_test.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,...)
bool ECPGtrans(int lineno, const char *connection_name, const char *transaction)
numeric * PGTYPESnumeric_new(void)
void PGTYPESnumeric_free(numeric *var)