Re: Fix for edge case in date_bin() function

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Moaaz Assali <ma5679(at)nyu(dot)edu>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix for edge case in date_bin() function
Date: 2024-02-27 08:48:12
Message-ID: 6200ACB3-8ECF-487B-8F9D-290BBEE146B4@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 27 Feb 2024, at 09:42, Moaaz Assali <ma5679(at)nyu(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Benoit Lobréau 2024-02-27 09:55:27 Re: Logging parallel worker draught
Previous Message Moaaz Assali 2024-02-27 08:42:26 Fix for edge case in date_bin() function