mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +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:
		@@ -307,7 +307,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
 | 
			
		||||
@@ -319,7 +319,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
 | 
			
		||||
 
 | 
			
		||||
@@ -225,7 +225,7 @@ WHERE  hash_range(v)::bit(32) != hash_range_extended(v, 0)::bit(32)
 | 
			
		||||
-- 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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user