Re: Analysis Function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Analysis Function
Дата
Msg-id 12241.1276287655@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Analysis Function  (David Jarvis <thangalin@gmail.com>)
Ответы Re: Analysis Function  (David Jarvis <thangalin@gmail.com>)
Список pgsql-performance
David Jarvis <thangalin@gmail.com> writes:
> dateserial(PG_FUNCTION_ARGS) {
>   int32 p_year = (int32)PG_GETARG_FLOAT8(0);
>   int32 p_month = PG_GETARG_INT32(1);
>   int32 p_day = PG_GETARG_INT32(2);

Er ... why float?  Integer is plenty for the range of years supported by
the PG datetime infrastructure.  The above coding is pretty lousy in terms
of its roundoff and overflow behavior, too.

            regards, tom lane

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

Предыдущее
От: Tim Landscheidt
Дата:
Сообщение: Re: Analysis Function
Следующее
От: David Jarvis
Дата:
Сообщение: Re: Analysis Function