Re: uuidv7 improperly accepts dates before 1970-01-01 - Mailing list pgsql-hackers

From Baji Shaik
Subject Re: uuidv7 improperly accepts dates before 1970-01-01
Date
Msg-id CA+fm-RPjp8fC-w50PApyhrfMqY4SA0zT5s1Nq=+03+ALcf+3+A@mail.gmail.com
Whole thread
In response to Re: uuidv7 improperly accepts dates before 1970-01-01  (Zsolt Parragi <zsolt.parragi@percona.com>)
Responses Re: uuidv7 improperly accepts dates before 1970-01-01
List pgsql-hackers
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.
Attachment

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Report bytes and transactions actually sent downtream
Next
From: Jeff Davis
Date:
Subject: Re: Small patch to improve safety of utf8_to_unicode().