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

Commitfd54914

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 parent6588d84 commitfd54914

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
@@ -348,7 +348,7 @@ SELECT hashfloat4('0'::float4) = hashfloat4('-0'::float4) AS t;
348348
t
349349
(1 row)
350350

351-
SELECT hashfloat4('NaN'::float4) = hashfloat4('-NaN'::float4) AS t;
351+
SELECT hashfloat4('NaN'::float4) = hashfloat4(-'NaN'::float4) AS t;
352352
t
353353
---
354354
t
@@ -360,7 +360,7 @@ SELECT hashfloat8('0'::float8) = hashfloat8('-0'::float8) AS t;
360360
t
361361
(1 row)
362362

363-
SELECT hashfloat8('NaN'::float8) = hashfloat8('-NaN'::float8) AS t;
363+
SELECT hashfloat8('NaN'::float8) = hashfloat8(-'NaN'::float8) AS t;
364364
t
365365
---
366366
t

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ DROP TYPE hash_test_t2;
258258
-- Check special cases for specific data types
259259
--
260260
SELECT hashfloat4('0'::float4)= hashfloat4('-0'::float4)AS t;
261-
SELECT hashfloat4('NaN'::float4)= hashfloat4('-NaN'::float4)AS t;
261+
SELECT hashfloat4('NaN'::float4)= hashfloat4(-'NaN'::float4)AS t;
262262
SELECT hashfloat8('0'::float8)= hashfloat8('-0'::float8)AS t;
263-
SELECT hashfloat8('NaN'::float8)= hashfloat8('-NaN'::float8)AS t;
263+
SELECT hashfloat8('NaN'::float8)= hashfloat8(-'NaN'::float8)AS t;
264264
SELECT hashfloat4('NaN'::float4)= hashfloat8('NaN'::float8)AS t;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp