Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit55e0e45

Browse files
committed
Test conversion of NaN between float4 and float8.
Results from buildfarm member opossum suggest that this doesn't workquite right on that platform. We've seen issues with NaN support onMIPS/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'dnecessarily keep long-term. I think that the failures in window.sqlcould be worked around with some code duplication, but I want toverify my theory about the cause first.
1 parenta0fefbc commit55e0e45

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

‎src/test/regress/expected/float4-exp-three-digits.out

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,18 @@ SELECT 'nan'::numeric::float4;
125125
NaN
126126
(1 row)
127127

128+
SELECT 'nan'::float8::float4;
129+
float4
130+
--------
131+
NaN
132+
(1 row)
133+
134+
SELECT 'nan'::float4::float8;
135+
float8
136+
--------
137+
NaN
138+
(1 row)
139+
128140
SELECT '' AS five, * FROM FLOAT4_TBL;
129141
five | f1
130142
------+--------------

‎src/test/regress/expected/float4.out

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,18 @@ SELECT 'nan'::numeric::float4;
125125
NaN
126126
(1 row)
127127

128+
SELECT 'nan'::float8::float4;
129+
float4
130+
--------
131+
NaN
132+
(1 row)
133+
134+
SELECT 'nan'::float4::float8;
135+
float8
136+
--------
137+
NaN
138+
(1 row)
139+
128140
SELECT '' AS five, * FROM FLOAT4_TBL;
129141
five | f1
130142
------+-------------

‎src/test/regress/sql/float4.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ SELECT 'Infinity'::float4 + 100.0;
4141
SELECT'Infinity'::float4/'Infinity'::float4;
4242
SELECT'nan'::float4/'nan'::float4;
4343
SELECT'nan'::numeric::float4;
44+
SELECT'nan'::float8::float4;
45+
SELECT'nan'::float4::float8;
4446

4547
SELECT''AS five,*FROM FLOAT4_TBL;
4648

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp