Hii,
When playing around with UUIDv7s, I discovered that it accepts this:
xof=# SELECT uuidv7(INTERVAL '-1000 years');
uuidv7
--------------------------------------
e4ea52a0-bda1-7121-8f1f-3d9bb3d9a76e
(1 row)
But RFC 9562 defines the time field as an unsigned number of milliseconds since Unix epoch, so timestamps earlier than
thatshould be rejected. "Don't do that" is one answer, but for good hygiene, here's a patch that adds a < 0 check and
aregression test. Applies cleanly to HEAD, make check passes.