diff options
| author | Neil Conway <neilc@samurai.com> | 2004-03-12 00:25:43 +0000 |
|---|---|---|
| committer | Neil Conway <neilc@samurai.com> | 2004-03-12 00:25:43 +0000 |
| commit | bfd6f52b0e0f1c1d579bf385dedfebca229dfcf5 (patch) | |
| tree | d93225b282bd93d404205aaa8138ce262ae4cbdc /src/test/regress/expected/float4.out | |
| parent | fe6e9221360116e440fc28e45b083eb0811682cd (diff) | |
| download | postgresql-bfd6f52b0e0f1c1d579bf385dedfebca229dfcf5.tar.gz | |
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.
Diffstat (limited to 'src/test/regress/expected/float4.out')
| -rw-r--r-- | src/test/regress/expected/float4.out | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/test/regress/expected/float4.out b/src/test/regress/expected/float4.out index 124b7c378c..e4d460359f 100644 --- a/src/test/regress/expected/float4.out +++ b/src/test/regress/expected/float4.out @@ -50,9 +50,39 @@ SELECT ' NAN '::float4; NaN (1 row) +SELECT 'infinity'::float4; + float4 +---------- + Infinity +(1 row) + +SELECT ' -INFINiTY '::float4; + float4 +----------- + -Infinity +(1 row) + -- bad special inputs SELECT 'N A N'::float4; ERROR: invalid input syntax for type real: "N A N" +SELECT 'NaN x'::float4; +ERROR: invalid input syntax for type real: "NaN x" +SELECT ' INFINITY x'::float4; +ERROR: invalid input syntax for type real: " INFINITY x" +SELECT 'Infinity'::float4 + 100.0; +ERROR: type "double precision" value out of range: overflow +SELECT 'Infinity'::float4 / 'Infinity'::float4; + ?column? +---------- + NaN +(1 row) + +SELECT 'nan'::float4 / 'nan'::float4; + ?column? +---------- + NaN +(1 row) + SELECT '' AS five, FLOAT4_TBL.*; five | f1 ------+------------- |
