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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
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: NaNs in numeric_power (was Re: Postgres 11 release notes)
Date: 2018-05-15 21:55:38
Message-ID: 10898.1526421338@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-www

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.

regards, tom lane

Attachment Content-Type Size
make-numeric_power-handle-NaNs-per-POSIX.patch text/x-diff 2.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-05-15 22:07:42 Re: Flexible permissions for REFRESH MATERIALIZED VIEW
Previous Message Andres Freund 2018-05-15 21:32:55 Re: Make description of heap records more talkative for flags

Browse pgsql-www by date

  From Date Subject
Next Message Bruce Momjian 2018-05-15 23:12:23 Re: Postgres 11 release notes
Previous Message Tatsuo Ishii 2018-05-15 21:11:52 Re: Postgres 11 release notes