Commit 08b96a2b authored by Tom Lane's avatar Tom Lane

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.
parent 6b54f123
...@@ -348,7 +348,7 @@ SELECT hashfloat4('0'::float4) = hashfloat4('-0'::float4) AS t; ...@@ -348,7 +348,7 @@ SELECT hashfloat4('0'::float4) = hashfloat4('-0'::float4) AS t;
t t
(1 row) (1 row)
SELECT hashfloat4('NaN'::float4) = hashfloat4('-NaN'::float4) AS t; SELECT hashfloat4('NaN'::float4) = hashfloat4(-'NaN'::float4) AS t;
t t
--- ---
t t
...@@ -360,7 +360,7 @@ SELECT hashfloat8('0'::float8) = hashfloat8('-0'::float8) AS t; ...@@ -360,7 +360,7 @@ SELECT hashfloat8('0'::float8) = hashfloat8('-0'::float8) AS t;
t t
(1 row) (1 row)
SELECT hashfloat8('NaN'::float8) = hashfloat8('-NaN'::float8) AS t; SELECT hashfloat8('NaN'::float8) = hashfloat8(-'NaN'::float8) AS t;
t t
--- ---
t t
......
...@@ -258,7 +258,7 @@ DROP TYPE hash_test_t2; ...@@ -258,7 +258,7 @@ DROP TYPE hash_test_t2;
-- Check special cases for specific data types -- Check special cases for specific data types
-- --
SELECT hashfloat4('0'::float4) = hashfloat4('-0'::float4) AS t; 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('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; SELECT hashfloat4('NaN'::float4) = hashfloat8('NaN'::float8) AS t;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment