public inbox for [email protected]  
help / color / mirror / Atom feed
From: Daniel Gustafsson <[email protected]>
To: Moaaz Assali <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Fix for edge case in date_bin() function
Date: Tue, 27 Feb 2024 09:48:12 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CALkF+nvtuas-2kydG-WfofbRSJpyODAJWun==W-yO5j2R4meqA@mail.gmail.com>
References: <CALkF+nvtuas-2kydG-WfofbRSJpyODAJWun==W-yO5j2R4meqA@mail.gmail.com>

> On 27 Feb 2024, at 09:42, Moaaz Assali <[email protected]> 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







view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Fix for edge case in date_bin() function
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox