diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2013-08-03 12:39:51 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2013-08-03 12:40:36 -0400 |
commit | b5a20ab3e0310103ff11337faeed3c521f5eb917 (patch) | |
tree | 85c28bd48b5b68417d07ce7bcda4d3d79a66b87d /src/backend/utils/adt/jsonfuncs.c | |
parent | 69fdc9577b09dce732153c33c2484dac7d506ad9 (diff) | |
download | postgresql-b5a20ab3e0310103ff11337faeed3c521f5eb917.tar.gz postgresql-b5a20ab3e0310103ff11337faeed3c521f5eb917.zip |
Make sure float4in/float8in accept all standard spellings of "infinity".
The C99 and POSIX standards require strtod() to accept all these spellings
(case-insensitively): "inf", "+inf", "-inf", "infinity", "+infinity",
"-infinity". However, pre-C99 systems might accept only some or none of
these, and apparently Windows still doesn't accept "inf". To avoid
surprising cross-platform behavioral differences, manually check for each
of these spellings if strtod() fails. We were previously handling just
"infinity" and "-infinity" that way, but since C99 is most of the world
now, it seems likely that applications are expecting all these spellings
to work.
Per bug #8355 from Basil Peace. It turns out this fix won't actually
resolve his problem, because Python isn't being this careful; but that
doesn't mean we shouldn't be.
Diffstat (limited to 'src/backend/utils/adt/jsonfuncs.c')
0 files changed, 0 insertions, 0 deletions