Re: Bug #534: factorial function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bug #534: factorial function
Дата
Msg-id 18290.1007997395@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Bug #534: factorial function  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-bugs
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Yep, 0! sure looks like a bug.  We will fix it in 7.3.  Not sure about
> the double precision.  Comments?

It looks like we have three versions of factorial, for int2 int4 and
int8.  The version taking int2 is just plain wasted code space (perhaps
it predates the availability of automatic type conversions?)  The int4
and int8 versions both have a serious problem with lack of overflow
detection.  I'd be sorely tempted to replace all three by a single
function that takes integer and returns numeric.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Bug #531: libpq: Operations following PQfinish() work.
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: Bug #534: factorial function