Re: Fix overflow hazard in timestamp_pl_interval

Поиск
Список
Период
Сортировка
От Joseph Koshakow
Тема Re: Fix overflow hazard in timestamp_pl_interval
Дата
Msg-id CAAvxfHcVWTnP0Snh7txRm8ftZRMh7QtJxn2Fgb7zf9pprRyeew@mail.gmail.com
обсуждение исходный текст
Ответ на Fix overflow hazard in timestamp_pl_interval  (Joseph Koshakow <koshy44@gmail.com>)
Ответы Re: Fix overflow hazard in timestamp_pl_interval  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi all,

Immediately after sending this I realized that timestamptz suffers
from the same problem. Attached is an updated patch that fixes
timestamptz too.

Thanks,
Joe Koshakow

On Sat, Apr 27, 2024 at 10:59 PM Joseph Koshakow <koshy44@gmail.com> wrote:
Hi all,

Attached is a patch that fixes some overflow/underflow hazards in
`timestamp_pl_interval`. The microseconds overflow could produce
incorrect result. The month overflow would generally still result in an
error from the timestamp month field being too low, but it's still
better to catch it early.

I couldn't find any existing timestamp plus interval tests so I stuck
a new tests in `timestamp.sql`. If there's a better place, then
please let me know.

Thanks,
Joe Koshakow
Вложения

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

Предыдущее
От: Joseph Koshakow
Дата:
Сообщение: Fix overflow hazard in timestamp_pl_interval
Следующее
От: Alexander Lakhin
Дата:
Сообщение: Re: partitioning and identity column