On Mon, Jun 29, 2026 at 6:18 PM Masahiko Sawada <[email protected]> wrote:
> It does the range validation on the Unix-epoch value, after converting > back from the shifted PostgreSQL-epoch timestamp. Can we compare > pre-compute the Unix-epoch timestamp resentable window in > PostgreSQL-epoch units against the shifted PostgreSQL-epoch timestamp > before converting it back to the Unix epoch? That way, we don't need > to worry about the overflow. > > Let's merge these two if statements as they use the same error message. > Thanks for the review. Attached v4 addressing your feedback: - 0002 now pre-computes the valid timestamp range in PostgreSQL-epoch units (UUIDV7_MIN_TIMESTAMP / UUIDV7_MAX_TIMESTAMP) and validates the shifted TimestampTz directly, before converting to Unix epoch. This eliminates the overflow concern entirely. - The pre-epoch and upper-bound checks are merged into a single if statement. 0001 (infinite intervals) is unchanged from v3. Thanks, Baji Shaik
v4-0002-Reject-out-of-range-timestamps-in-uuidv7-interval.patch
Description: Binary data
v4-0001-Reject-infinite-intervals-in-uuidv7-interval.patch
Description: Binary data
