Re: date_trunc invalid units with infinite value
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Joseph Koshakow <koshy44@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-12-24T07:33:47Z
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
Commits
-
Improve tests of date_trunc() with infinity and unsupported units
- 67ffe1987d0a 18.0 landed
- 572c0f1b0e2a 19 (unreleased) landed
-
Fix incorrect Datum conversion in timestamptz_trunc_internal()
- 074db8604ad1 18.0 landed
- 2242b26ce472 19 (unreleased) landed
-
Improve handling of date_trunc() units for infinite input values
- d85ce012f99f 18.0 landed