Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Aug 24, 2011 at 11:45 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I kinda suspect that the NaN behavior was not designed but accidental.
>> What I'm wondering is whether it's really the "right", sensible,
>> behavior.
> On a blank slate, I might choose to do it differently, but considering
> that we have numerous releases out in the field that return NaN, I
> think we should stick with that rather than using this minor bug as an
> excuse to change the answer on platforms where this isn't already
> broken.
[ pokes at it... ] Hmm, you're right, everything back to 8.2 produces
NaNs on this test case (at least on IEEE-compliant platforms). I yield
to the "let's emit NaN" viewpoint.
regards, tom lane