Re: UUID v7

Поиск
Список
Период
Сортировка
От Przemysław Sztoch
Тема Re: UUID v7
Дата
Msg-id e9f035db-b3ec-110d-326e-fc85e82ccf92@sztoch.pl
обсуждение исходный текст
Ответ на Re: UUID v7  (Jelte Fennema-Nio <postgres@jeltef.nl>)
Ответы Re: UUID v7  (Jelte Fennema-Nio <postgres@jeltef.nl>)
Список pgsql-hackers
Jelte Fennema-Nio wrote on 1/16/2024 9:25 PM:
On Tue, 16 Jan 2024 at 19:17, Andrey M. Borodin <x4mmm@yandex-team.ru> wrote:
So currently my preference for the function names would be:

- uuidv4() -> alias for gen_random_uuid()
- uuidv7()
- uuidv7(timestamptz)
- uuid_extract_ver(uuid)
- uuid_extract_var(uuid)
- uuidv7_extract_time(uuid)
+1
But replace uuidv7_extract_time(uuid) with uuid_extract_time(uuid) - function should be able extract timestamp from v1/v6/v7

I would highly recommend to add:
uuidv5(namespace uuid, name text) -> uuid
using uuid_generate_v5 from uuid-ossp extension (https://www.postgresql.org/docs/current/uuid-ossp.html)
There is an important version and it should be included into the main PG code.

Jelte: Please propose the name of the function that will convert uuid from version 1 to 6.
v6 is almost as good as v7 for indexes. And v6 allows you to convert from v1 which some people use.
--
Przemysław Sztoch | Mobile +48 509 99 00 66

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: cleanup patches for incremental backup
Следующее
От: Przemysław Sztoch
Дата:
Сообщение: Re: UUID v7