Re: Fix for edge case in date_bin() function - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Fix for edge case in date_bin() function
Date
Msg-id 6200ACB3-8ECF-487B-8F9D-290BBEE146B4@yesql.se
Whole thread Raw
In response to Fix for edge case in date_bin() function  (Moaaz Assali <ma5679@nyu.edu>)
Responses Re: Fix for edge case in date_bin() function
List pgsql-hackers
> 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
strideinterval 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 by date:

Previous
From: Moaaz Assali
Date:
Subject: Fix for edge case in date_bin() function
Next
From: Benoit Lobréau
Date:
Subject: Re: Logging parallel worker draught