64{
67
68
69
70
71#line 17 "num_test.pgc"
73
74#line 19 "num_test.pgc"
75
76 double d;
77 long l1, l2;
79
81
82#line 25 "num_test.pgc"
83
84
85 {
ECPGconnect(__LINE__, 0,
"ecpg1_regression" , NULL, NULL , NULL, 0);
86#line 27 "num_test.pgc"
87
89#line 27 "num_test.pgc"
90
91
93#line 29 "num_test.pgc"
94
96#line 29 "num_test.pgc"
97
98 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"create table test ( text char ( 5 ) , num numeric ( 14 , 7 ) )",
ECPGt_EOIT,
ECPGt_EORT);
99#line 30 "num_test.pgc"
100
102#line 30 "num_test.pgc"
103
104
111
119
125
128 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"insert into test ( text , num ) values ( 'test' , $1 )",
131#line 55 "num_test.pgc"
132
134#line 55 "num_test.pgc"
135
136
140
144#line 61 "num_test.pgc"
145
147#line 61 "num_test.pgc"
148
149
155
163
166
170 printf(
"to long(%d) = %ld %ld\n",
i, l1, l2);
171
176
177
180 printf(
"min int = %d\n", min);
182
185 printf(
"max int = %d\n", max);
187
189#line 101 "num_test.pgc"
190
192#line 101 "num_test.pgc"
193
195#line 102 "num_test.pgc"
196
198#line 102 "num_test.pgc"
199
200
201 return 0;
202}
bool ECPGsetcommit(int lineno, const char *mode, const char *connection_name)
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)
void PGTYPESchar_free(char *ptr)
int PGTYPESnumeric_copy(numeric *src, numeric *dst)
numeric * PGTYPESnumeric_new(void)
char * PGTYPESnumeric_to_asc(numeric *num, int dscale)
int PGTYPESnumeric_mul(numeric *var1, numeric *var2, numeric *result)
int PGTYPESnumeric_to_long(numeric *nv, long *lp)
int PGTYPESnumeric_to_double(numeric *nv, double *dp)
int PGTYPESnumeric_to_int(numeric *nv, int *ip)
int PGTYPESnumeric_from_int(signed int int_val, numeric *var)
int PGTYPESnumeric_sub(numeric *var1, numeric *var2, numeric *result)
void PGTYPESnumeric_free(numeric *var)
int PGTYPESnumeric_div(numeric *var1, numeric *var2, numeric *result)
int PGTYPESnumeric_add(numeric *var1, numeric *var2, numeric *result)
numeric * PGTYPESnumeric_from_asc(char *str, char **endptr)
static void print_double(double x)