mirror of
https://github.com/postgres/postgres.git
synced 2025-07-15 19:21:59 +03:00
Do not check nan values for infinity. Some system are not able to handle this.
By Zoltán Böszörményi
This commit is contained in:
@ -104,10 +104,10 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||
|
||||
if (sqlca.sqlcode)
|
||||
break;
|
||||
if (isinf(d))
|
||||
printf("%d %sInf '%s'\n", id, (d < 0 ? "-" : "+"), val);
|
||||
if (isnan(d))
|
||||
printf("%d NaN '%s'\n", id, val);
|
||||
else if (isinf(d))
|
||||
printf("%d %sInf '%s'\n", id, (d < 0 ? "-" : "+"), val);
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into nantest1 ( id , d ) values ( $1 + 3 , $2 )",
|
||||
ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
|
||||
|
@ -37,10 +37,10 @@ main(void)
|
||||
exec sql fetch from cur into :id, :d, :val;
|
||||
if (sqlca.sqlcode)
|
||||
break;
|
||||
if (isinf(d))
|
||||
printf("%d %sInf '%s'\n", id, (d < 0 ? "-" : "+"), val);
|
||||
if (isnan(d))
|
||||
printf("%d NaN '%s'\n", id, val);
|
||||
else if (isinf(d))
|
||||
printf("%d %sInf '%s'\n", id, (d < 0 ? "-" : "+"), val);
|
||||
|
||||
exec sql insert into nantest1 (id, d) values (:id + 3, :d);
|
||||
exec sql insert into nantest1 (id, d) values (:id + 6, :val);
|
||||
|
Reference in New Issue
Block a user