Re: Fix overflow in justify_interval related functions

Поиск
Список
Период
Сортировка
От Joseph Koshakow
Тема Re: Fix overflow in justify_interval related functions
Дата
Msg-id CAAvxfHd1naq8NGyU10R1fG+nCQKcrrFBK3YfLuuGu1R7nB=Z7A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Fix overflow in justify_interval related functions  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: Fix overflow in justify_interval related functions  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
On Mon, Feb 14, 2022 at 7:59 PM Nathan Bossart <nathandbossart@gmail.com> wrote:
> I think it's possible to avoid overflow in justify_interval() in some cases
> by pre-justifying the days.  I've attached a patch to demonstrate.
>
> --
> Nathan Bossart
> Amazon Web Services: https://aws.amazon.com

Good catch, I didn't think about that. Though if you are pre-justifying
the days, then I don't think it's possible for the second addition to
days to overflow. The maximum amount the days field could be after
the first justification is 29. I think we can simplify it further to the
attached patch.

- Joe

Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: automatically generating node support functions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: automatically generating node support functions