Re: date_trunc invalid units with infinite value

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Joseph Koshakow <koshy44(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: date_trunc invalid units with infinite value
Date: 2024-12-24 07:33:47
Message-ID: Z2pj22b9qZryFIRo@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 05, 2024 at 02:34:41PM +0900, Michael Paquier wrote:
> I agree that it is inconsistent that we allow infinite values to go
> through this function call even for fields that are not listed as
> supported by the documentation. So, yes, I think that what you are
> doing the right thing by applying the check based on the units
> supported, but I also doubt that it is something that we could
> backpatch as it would cause queries to work now to suddenly break.
>
> Thoughts and comments from others are welcome.

Hearing nothing, I have looked at this patch again and I think that
I'm OK with your proposal. While the discrepancy is annoying for
back-branches, this causes a slight change of behavior, so I have no
backpatch in mind.

I am planning to get this one applied around the end of this week on
Friday for HEAD, that should be enough if there are comments and/or
objections.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2024-12-24 07:38:51 Re: Recovering from detoast-related catcache invalidations
Previous Message Yugo Nagata 2024-12-24 07:04:42 Re: Allow ILIKE forward matching to use btree index