Re: Re: UUID v7
Przemysław Sztoch <przemyslaw@sztoch.pl>
From: Przemysław Sztoch <przemyslaw@sztoch.pl>
To: "Andrey M. Borodin" <x4mmm@yandex-team.ru>
Cc: Andrey Borodin <amborodin86@gmail.com>, Jelte Fennema
<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>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>,
"brad@peabody.io" <brad@peabody.io>, "wolakk@gmail.com" <wolakk@gmail.com>,
sergeyprokhorenko@yahoo.com.au
Date: 2024-01-02T23:37:28Z
Lists: pgsql-hackers
Dear Andrey, 1. Is it possible to add a function that returns the version of the generated uuid? It will be very useful. I don't know if it's possible, but I think there are bits in the UUID that inform about the version. 2. If there is any doubt about adding the function to the main sources (standard development in progress), in my opinion you can definitely add this function to the uuid-ossp extension. 3. Wouldn't it be worth including UUID version 6 as well? 4. Sometimes you will need to generate a uuid for historical time. There should be an additional function gen_uuid_v7(timestamp). Nevertheless, the need for uuid v6/7/8 is very high and I'm glad it's coming to PostgreSQL. It should be a PG17 version. -- 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