Test conversion of NaN between float4 and float8.

Results from buildfarm member opossum suggest that this doesn't work
quite right on that platform.  We've seen issues with NaN support on
MIPS/NetBSD before ... allegedly they fixed this stuff back in 2010,
but maybe only for small values of "fixed".

If, in fact, opossum fails this test then I plan to revert it;
it's mainly for diagnostic purposes rather than something we'd
necessarily keep long-term.  I think that the failures in window.sql
could be worked around with some code duplication, but I want to
verify my theory about the cause first.
This commit is contained in:
Tom Lane 2018-04-20 19:54:58 -04:00
parent a0fefbcb71
commit 55e0e45817
3 changed files with 26 additions and 0 deletions

View File

@ -125,6 +125,18 @@ SELECT 'nan'::numeric::float4;
NaN
(1 row)
SELECT 'nan'::float8::float4;
float4
--------
NaN
(1 row)
SELECT 'nan'::float4::float8;
float8
--------
NaN
(1 row)
SELECT '' AS five, * FROM FLOAT4_TBL;
five | f1
------+--------------

View File

@ -125,6 +125,18 @@ SELECT 'nan'::numeric::float4;
NaN
(1 row)
SELECT 'nan'::float8::float4;
float4
--------
NaN
(1 row)
SELECT 'nan'::float4::float8;
float8
--------
NaN
(1 row)
SELECT '' AS five, * FROM FLOAT4_TBL;
five | f1
------+-------------

View File

@ -41,6 +41,8 @@ SELECT 'Infinity'::float4 + 100.0;
SELECT 'Infinity'::float4 / 'Infinity'::float4;
SELECT 'nan'::float4 / 'nan'::float4;
SELECT 'nan'::numeric::float4;
SELECT 'nan'::float8::float4;
SELECT 'nan'::float4::float8;
SELECT '' AS five, * FROM FLOAT4_TBL;