Re: Fix for edge case in date_bin() function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Fix for edge case in date_bin() function
Дата
Msg-id 2425370.1709147204@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Fix for edge case in date_bin() function  (Moaaz Assali <ma5679@nyu.edu>)
Ответы Re: Fix for edge case in date_bin() function  (Moaaz Assali <ma5679@nyu.edu>)
Список pgsql-hackers
Moaaz Assali <ma5679@nyu.edu> writes:
> - I have used INT64 -> UINT64 mapping in order to ensure no integer
> overflows are possible.

I don't think I trust this idea, and in any case it doesn't remove
all the overflow hazards: the reduction of the stride interval to
microseconds can overflow, and the final subtraction of the stride
can too.  I changed it to just do the straightforward thing
(throwing error if the pg_xxx_s64_overflow routines detect error),
and pushed it.  Thanks for the report and patch!

            regards, tom lane



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

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: Re: An improved README experience for PostgreSQL
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: Re: An improved README experience for PostgreSQL