Re: uuidv7 improperly accepts dates before 1970-01-01
Baji Shaik <baji.pgdev@gmail.com>
From: Baji Shaik <baji.pgdev@gmail.com>
To: Zsolt Parragi <zsolt.parragi@percona.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2026-06-24T23:22:20Z
Lists: pgsql-bugs, pgsql-hackers
Attachments
- v2-0001-Reject-infinite-intervals-in-uuidv7-interval.patch (application/octet-stream) patch v2-0001
- v2-0003-Reject-timestamps-beyond-48-bit-limit-in-uuidv7-i.patch (application/octet-stream) patch v2-0003
- v2-0002-Reject-pre-epoch-timestamps-in-uuidv7-interval.patch (application/octet-stream) patch v2-0002
Thank you Masahiko, Tristan, Christophe, and Zsolt for the reviews and feedback. Addressing the feedback in a single email. Attached v2 addressing the feedback: - Moved infinity check before timestamp arithmetic [Masahiko] - Used INT64CONST() for the 48-bit constant [Masahiko] - Added documentation for the valid timestamp range [Masahiko, Christophe] - Added a test for '292230 years' to cover the overflow path caught by pg_add_s64_overflow() [Zsolt Parragi] 0001 - Reject infinite intervals 0002 - Reject pre-epoch timestamps (with overflow-safe epoch conversion) 0003 - Reject timestamps beyond the 48-bit limit Let me know if I have missed anything. Thanks, Baji Shaik.
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
COPY TO FORMAT JSON: respect column list order
- effb923d9dec 19 (unreleased) landed