diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2018-04-20 19:54:58 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2018-04-20 19:55:08 -0400 |
commit | 55e0e458170c76c1a0074cd550a13ec47e38a3fa (patch) | |
tree | fcdf3ab09f882cea76f54b18748dcb66b253d5f2 /src | |
parent | a0fefbcb718fedd8f0198f74c3ae27933c92b090 (diff) | |
download | postgresql-55e0e458170c76c1a0074cd550a13ec47e38a3fa.tar.gz postgresql-55e0e458170c76c1a0074cd550a13ec47e38a3fa.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/test/regress/expected/float4-exp-three-digits.out | 12 | ||||
-rw-r--r-- | src/test/regress/expected/float4.out | 12 | ||||
-rw-r--r-- | src/test/regress/sql/float4.sql | 2 |
3 files changed, 26 insertions, 0 deletions
diff --git a/src/test/regress/expected/float4-exp-three-digits.out b/src/test/regress/expected/float4-exp-three-digits.out index f17f95697a2..ea6f77a671a 100644 --- a/src/test/regress/expected/float4-exp-three-digits.out +++ b/src/test/regress/expected/float4-exp-three-digits.out @@ -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 ------+-------------- diff --git a/src/test/regress/expected/float4.out b/src/test/regress/expected/float4.out index fd46a4a1db7..ab9b1acd493 100644 --- a/src/test/regress/expected/float4.out +++ b/src/test/regress/expected/float4.out @@ -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 ------+------------- diff --git a/src/test/regress/sql/float4.sql b/src/test/regress/sql/float4.sql index 3b363f94635..e6f5c7425da 100644 --- a/src/test/regress/sql/float4.sql +++ b/src/test/regress/sql/float4.sql @@ -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; |