Allow 'Infinity' and '-Infinity' as input to the float4 and float8
Neil Conway <neilc@samurai.com>
Allow 'Infinity' and '-Infinity' as input to the float4 and float8 types. Update the regression tests and the documentation to reflect this. Remove the UNSAFE_FLOATS #ifdef. This is only half the story: we still unconditionally reject floating point operations that result in +/- infinity. See recent thread on -hackers for more information.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/syntax.sgml | modified | +18 −1 |
| src/backend/utils/adt/float.c | modified | +16 −32 |
| src/include/pg_config_manual.h | modified | +1 −7 |
| src/test/regress/expected/float4.out | modified | +30 −0 |
| src/test/regress/expected/float8.out | modified | +30 −0 |
| src/test/regress/sql/float4.sql | modified | +9 −0 |
| src/test/regress/sql/float8.sql | modified | +8 −0 |