Incompatible trig error handling - Mailing list pgsql-hackers

From John Gorman
Subject Incompatible trig error handling
Date
Msg-id CALkS6B-eKw_wrd3CLKM2noS-pqCDJ=Uxznkq8oEpW3AZLBFh9g@mail.gmail.com
Whole thread Raw
Responses Re: Incompatible trig error handling
List pgsql-hackers
Two of the trigonometry functions have differing error condition behavior between Linux and OSX. The Linux behavior follows the standard set by the other trig functions.

On Linux:

SELECT asin(2);
ERROR:  input is out of range
 
SELECT acos(2);
ERROR:  input is out of range

On OSX:

SELECT asin(2);
 asin
------
  NaN
(1 row)
 
SELECT asin(2);
 asin
------
  NaN
(1 row)

The attached patch brings OSX into line with the expected behaviour and the additional regression tests verify this.

Is this worth fixing and if so what is the next step?

Best, John
Attachment

pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: mogrify and indent features for jsonb
Next
From: Simon Riggs
Date:
Subject: Re: INSERT ... ON CONFLICT syntax issues