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

Commit9089f15

Browse files
committed
Fix portability issue in tests from commitce773f2.
Modern POSIX seems to require strtod() to accept "-NaN", but there'snothing about NaN in SUSv2, and some of our oldest buildfarm membersdon't like it. Let's try writing it as -'NaN' instead; that seemsto produce the same result, at least on Intel hardware.Per buildfarm.
1 parentbe2bead commit9089f15

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ SELECT hashfloat4('0'::float4) = hashfloat4('-0'::float4) AS t;
307307
t
308308
(1 row)
309309

310-
SELECT hashfloat4('NaN'::float4) = hashfloat4('-NaN'::float4) AS t;
310+
SELECT hashfloat4('NaN'::float4) = hashfloat4(-'NaN'::float4) AS t;
311311
t
312312
---
313313
t
@@ -319,7 +319,7 @@ SELECT hashfloat8('0'::float8) = hashfloat8('-0'::float8) AS t;
319319
t
320320
(1 row)
321321

322-
SELECT hashfloat8('NaN'::float8) = hashfloat8('-NaN'::float8) AS t;
322+
SELECT hashfloat8('NaN'::float8) = hashfloat8(-'NaN'::float8) AS t;
323323
t
324324
---
325325
t

‎src/test/regress/sql/hash_func.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ WHERE hash_range(v)::bit(32) != hash_range_extended(v, 0)::bit(32)
225225
-- Check special cases for specific data types
226226
--
227227
SELECT hashfloat4('0'::float4)= hashfloat4('-0'::float4)AS t;
228-
SELECT hashfloat4('NaN'::float4)= hashfloat4('-NaN'::float4)AS t;
228+
SELECT hashfloat4('NaN'::float4)= hashfloat4(-'NaN'::float4)AS t;
229229
SELECT hashfloat8('0'::float8)= hashfloat8('-0'::float8)AS t;
230-
SELECT hashfloat8('NaN'::float8)= hashfloat8('-NaN'::float8)AS t;
230+
SELECT hashfloat8('NaN'::float8)= hashfloat8(-'NaN'::float8)AS t;
231231
SELECT hashfloat4('NaN'::float4)= hashfloat8('NaN'::float8)AS t;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp