mirror of
https://github.com/postgres/postgres.git
synced 2025-05-06 19:59:18 +03:00
Fix portability issue in tests from commit ce773f230.
Modern POSIX seems to require strtod() to accept "-NaN", but there's nothing about NaN in SUSv2, and some of our oldest buildfarm members don't like it. Let's try writing it as -'NaN' instead; that seems to produce the same result, at least on Intel hardware. Per buildfarm.
This commit is contained in:
parent
6588d8416e
commit
fd549145d5
@ -348,7 +348,7 @@ SELECT hashfloat4('0'::float4) = hashfloat4('-0'::float4) AS t;
|
||||
t
|
||||
(1 row)
|
||||
|
||||
SELECT hashfloat4('NaN'::float4) = hashfloat4('-NaN'::float4) AS t;
|
||||
SELECT hashfloat4('NaN'::float4) = hashfloat4(-'NaN'::float4) AS t;
|
||||
t
|
||||
---
|
||||
t
|
||||
@ -360,7 +360,7 @@ SELECT hashfloat8('0'::float8) = hashfloat8('-0'::float8) AS t;
|
||||
t
|
||||
(1 row)
|
||||
|
||||
SELECT hashfloat8('NaN'::float8) = hashfloat8('-NaN'::float8) AS t;
|
||||
SELECT hashfloat8('NaN'::float8) = hashfloat8(-'NaN'::float8) AS t;
|
||||
t
|
||||
---
|
||||
t
|
||||
|
@ -258,7 +258,7 @@ DROP TYPE hash_test_t2;
|
||||
-- Check special cases for specific data types
|
||||
--
|
||||
SELECT hashfloat4('0'::float4) = hashfloat4('-0'::float4) AS t;
|
||||
SELECT hashfloat4('NaN'::float4) = hashfloat4('-NaN'::float4) AS t;
|
||||
SELECT hashfloat4('NaN'::float4) = hashfloat4(-'NaN'::float4) AS t;
|
||||
SELECT hashfloat8('0'::float8) = hashfloat8('-0'::float8) AS t;
|
||||
SELECT hashfloat8('NaN'::float8) = hashfloat8('-NaN'::float8) AS t;
|
||||
SELECT hashfloat8('NaN'::float8) = hashfloat8(-'NaN'::float8) AS t;
|
||||
SELECT hashfloat4('NaN'::float4) = hashfloat8('NaN'::float8) AS t;
|
||||
|
Loading…
x
Reference in New Issue
Block a user