Re: UUID v7
Przemysław Sztoch <przemyslaw@sztoch.pl>
From: Przemysław Sztoch <przemyslaw@sztoch.pl>
To: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: Sergey Prokhorenko <sergeyprokhorenko@yahoo.com.au>,
Jelte Fennema-Nio <postgres@jeltef.nl>, Nick Babadzhanian
<pgnickb@gmail.com>, Mat Arye <mat@timescaledb.com>,
Peter Eisentraut <peter.eisentraut@enterprisedb.com>,
Tom Lane <tgl@sss.pgh.pa.us>, Daniel Gustafsson <daniel@yesql.se>,
Matthias van de Meent <boekewurm+postgres@gmail.com>,
Nikolay Samokhvalov <samokhvalov@gmail.com>,
"Kyzer Davis (kydavis)" <kydavis@cisco.com>,
Andres Freund <andres@anarazel.de>,
pgsql-hackers mailing list <pgsql-hackers@postgresql.org>,
"brad@peabody.io" <brad@peabody.io>, Kirk Wolak <wolakk@gmail.com>
Date: 2024-01-16T20:20:58Z
Lists: pgsql-hackers
Andrey Borodin wrote on 1/16/2024 1:15 PM: > Sergey, Przemysław, Jelte, thanks for your feedback. > Here's v9. Changes: > 1. Swapped type of the argument to timestamptz in gen_uuid_v7() Please update docs part about optional timestamp argument. > 2. Renamed get_uuid_v7_time() to uuid_v7_time() Pleaserename uuid_v7_time to uuid_time() and add support for v1 and v6. If version is incompatible then return NULL. > 3. Added uuid_ver() and uuid_var(). Looks good. But for me, throwing an error is problematic. Wouldn't it be better to return -1. > What do you think? > Best regards, Andrey Borodin. -- Przemysław Sztoch | Mobile +48 509 99 00 66
Commits
-
Fix timestamp overflow in UUIDv7 implementation.
- a5419bc72e22 18.0 landed
-
Add UUID version 7 generation function.
- 78c5e141e9c1 18.0 landed
-
Add some UUID support functions
- 794f10f6b920 17.0 landed