Re: date_trunc invalid units with infinite value
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: Michael Paquier <michael@paquier.xyz>, Joseph Koshakow <koshy44@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-08-06T11:07:25Z
Lists: pgsql-hackers
Attachments
- 0001-Improve-test-coverage-of-date_trunc-on-infinity.patch (text/plain) patch 0001
- 0002-Fix-incorrect-Datum-conversion-in-timestamptz_trunc_.patch (text/plain) patch 0002
On 27.12.24 05:42, Michael Paquier wrote: > On Tue, Dec 24, 2024 at 04:33:47PM +0900, Michael Paquier wrote: >> 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. > > And done for now. If there are any remarks and/or objections, of > course feel free. It turned out this had a bug, and also the newly added test cases didn't actually cover the new code, otherwise this would have shown up. Please review the attached patches with additional test cases and the fix. See also [0] for further context: [0]: https://www.postgresql.org/message-id/8246d7ff-f4b7-4363-913e-827dadfeb145%40eisentraut.org
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