I guess we don't need to name it with the prefix UUIDV7 as the offset value is actually not limited to UUIDv7. How about renaming it to PG_UNIX_EPOCH_OFFSET_US?
+-- uuidv7: a large but in-range forward shift is accepted +SELECT uuid_extract_timestamp(uuidv7('1000 years'::interval)) > now() + '999 years'::interval;
I've merged two patches into one and made some cosmetic changes and the above suggestions. I'm going to push it, barring objections.
Thanks for the review and the cleanup! v6 looks good to me.
The rename to PG_UNIX_EPOCH_OFFSET_US makes sense, and replacing the 292230 years test with the in-range forward shift is a nice improvement.