Re: UUID v7

Поиск
Список
Период
Сортировка
От Mat Arye
Тема Re: UUID v7
Дата
Msg-id CADsUR0CR7FioUWdA5QaVKij6_BE_en4tPA+pdCWQvN8hy0m+Pg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: UUID v7  ("Andrey M. Borodin" <x4mmm@yandex-team.ru>)
Ответы Re: UUID v7  ("Andrey M. Borodin" <x4mmm@yandex-team.ru>)
Список pgsql-hackers
Andrey,

Thanks for all your work on this. I think this will be really useful. 

From a user perspective, it would be great to add 2 things:
- A function to extract the timestamp from a V7 UUID (very useful for defining constraints if partitioning by the uuid-embedded timestamps, for instance).
- Can we add an optional timestamptz argument to gen_uuid_v7 so that you can explicitly specify a time instead of always generating for the current time? If the argument is NULL, then use current time. This could be useful for backfilling and other applications.

Thanks,
Matvey Arye
Timescale software developer.


On Wed, Aug 30, 2023 at 3:05 PM Andrey M. Borodin <x4mmm@yandex-team.ru> wrote:


> On 21 Aug 2023, at 13:42, Andrey M. Borodin <x4mmm@yandex-team.ru> wrote:
>
> <v5-0001-Implement-UUID-v7-as-per-IETF-draft.patch><v5-0002-Buffer-random-numbers.patch><v5-0003-Use-cached-random-numbers-in-gen_random_uuid-too.patch>

FPA attached next version.
Changes:
- implemented protection from time leap backwards when series is generated on the same backend
- counter overflow is now translated into ms step forward


Best regards, Andrey Borodin.

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Replace some cstring_to_text to cstring_to_text_with_len
Следующее
От: Nathan Bossart
Дата:
Сообщение: Re: should frontend tools use syncfs() ?