Re: NaNs in numeric_power (was Re: Postgres 11 release notes)

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Đặng Minh Hướng <kakalot49(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: NaNs in numeric_power (was Re: Postgres 11 release notes)
Date: 2018-05-16 21:49:18
Message-ID: CAKJS1f-phLH0mnqct=VQn6aEmAQxwG+rRA21+6i-WQmQ7-YHwg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-www

On 16 May 2018 at 09:55, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> writes:
>> On 16 May 2018 at 02:01, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> I'm not particularly fussed about getting credit for that. However,
>>> looking again at how that patch series turned out --- ie, that
>>> we ensured POSIX behavior for NaNs only in HEAD --- I wonder
>>> whether we shouldn't do what was mentioned in the commit log for
>>> 6bdf1303, and teach numeric_pow() about these same special cases.
>>> It seems like it would be more consistent to change both functions
>>> for v11, rather than letting that other shoe drop in some future
>>> major release.
>
>> I'm inclined to agree. It's hard to imagine these two functions
>> behaving differently in regards to NaN input is useful to anyone.
>
> Here's a proposed patch for that.

Looks good to me.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2018-05-16 21:56:47 Re: Memory unit GUC range checks
Previous Message Thomas Munro 2018-05-16 21:41:25 Re: Removing unneeded self joins

Browse pgsql-www by date

  From Date Subject
Next Message Dean Rasheed 2018-05-16 22:30:09 Re: NaNs in numeric_power (was Re: Postgres 11 release notes)
Previous Message Magnus Hagander 2018-05-16 16:28:43 Re: Postgres 11 release notes