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: Nikolay Samokhvalov <nik@postgres.ai>,
Sergey Prokhorenko <sergeyprokhorenko@yahoo.com.au>,
"David G. Johnston" <david.g.johnston@gmail.com>,
Aleksander Alekseev <aleksander@timescale.com>,
pgsql-hackers mailing list <pgsql-hackers@postgresql.org>,
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>, "brad@peabody.io" <brad@peabody.io>,
Kirk Wolak <wolakk@gmail.com>
Date: 2024-01-25T11:14:38Z
Lists: pgsql-hackers
Andrey M. Borodin wrote on 25.01.2024 07:51: > >> On 25 Jan 2024, at 09:40, Nikolay Samokhvalov <nik@postgres.ai> wrote: >> >> From a practical point of view, these two things are extremely important to have to support partitioning. It is better to implement limitations than throw them away. > Postgres always was a bit hackerish, allowing slightly more then is safe. I.e. you can define immutable function that is not really immutable, turn off autovacuum or fsync. Why bother with safety guards here? > My opinion is that we should have this function to extract timestamp. Even if it can return strange values for imprecise RFC implementation. > > >> On 25 Jan 2024, at 02:15, Jelte Fennema-Nio <postgres@jeltef.nl> wrote: >> >> So +1 for erroring when you provide a timestamp outside of that range >> (either too far in the past or too far in the future). > > OK, it seems like we have some consensus on ERRORing.. > > Do we have any other open items? Does v13 address all open items? Maybe let’s compose better error message? +1 for erroring when ts is outside range. v13 looks good for me. I think we have reached a optimal compromise. -- 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