Re: Fix for edge case in date_bin() function

Поиск
Список
Период
Сортировка
От Moaaz Assali
Тема Re: Fix for edge case in date_bin() function
Дата
Msg-id CALkF+ns_ghEdVv2_mh=iCuirGnJHowtV0e_wg9_0RgkADo6dJg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Fix for edge case in date_bin() function  (Daniel Gustafsson <daniel@yesql.se>)
Список pgsql-hackers
Hello Daniel,

I have added a test case for this in timestamp.sql and timestamp.out, and tests pass when using the bug fix patch in the first email.
I have attached a new patch in this email below with the new tests only (doesn't include the bug fix).

P.S. I forgot to CC the mailing list in my previous reply. This is just a copy of it.

Best regards,
Moaaz Assali

On Tue, Feb 27, 2024 at 12:48 PM Daniel Gustafsson <daniel@yesql.se> wrote:
> On 27 Feb 2024, at 09:42, Moaaz Assali <ma5679@nyu.edu> wrote:

> To account for this edge, we simply add another condition in the if statement to not perform the subtraction by one stride interval if the time difference is divisible by the stride.

I only skimmed the patch, but I recommend adding a testcase to it to keep the
regression from reappearing.  src/test/regress/sql/timestamp.sql might be a
good candidate testsuite.

--
Daniel Gustafsson

Вложения

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

Предыдущее
От: Ashutosh Bapat
Дата:
Сообщение: Re: table inheritance versus column compression and storage settings
Следующее
От: Bertrand Drouvot
Дата:
Сообщение: Re: Synchronizing slots from primary to standby