Re: factorial of negative numbers

Поиск
Список
Период
Сортировка
От Juan José Santamaría Flecha
Тема Re: factorial of negative numbers
Дата
Msg-id CAC+AXB1AFZRYXL+qNdyJjYPEwZ01nUMij7wg2soKAcsBqDO3yA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: factorial of negative numbers  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: factorial of negative numbers  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers

On Thu, Jun 18, 2020 at 9:13 AM Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
On 2020-06-16 14:17, Dean Rasheed wrote:
> I think you're probably right though. Raising an out-of-range error
> seems like the best option.

committed as proposed then

The gamma function from math.h returns a NaN for negative integer values, the postgres factorial function returns a numeric, which allows NaN. Raising an out-of-range error seems only reasonable for an integer output.

Regards,

Juan José Santamaría Flecha

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Review for GetWALAvailability()
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Physical replication slot advance is not persistent