Re: UUID v7

From: Nick Babadzhanian <pgnickb(at)gmail(dot)com>
To: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>
Cc: Mat Arye <mat(at)timescaledb(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>, "Kyzer Davis (kydavis)" <kydavis(at)cisco(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Andrey Borodin <amborodin86(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, "brad(at)peabody(dot)io" <brad(at)peabody(dot)io>, "wolakk(at)gmail(dot)com" <wolakk(at)gmail(dot)com>, sergeyprokhorenko(at)yahoo(dot)com(dot)au
Subject: Re: UUID v7
Date: 2023-10-09 16:46:17
Message-ID: CABw73UoHCDdzT=Yv5FkM-6F+ReHV4jaGVdzA-J6jN6FDQCZr2Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 31 Aug 2023 at 23:10, Andrey M. Borodin <x4mmm(at)yandex-team(dot)ru> wrote:
> Well, as far as I know, RFC discourages extracting timestamps from UUIDs. But we still can have such functions...maybe as an extension?

Do you know of any reason for that?

> However, so far I haven't figured out how to implement optional arguments for catalog functions. I'd appreciate any pointers here.

I'd argue that the time argument shouldn't be optional. Asking the
user to supply time would force them to think whether they want to go
with `now()` or `clock_timestamp()` or something else.

Also, a shameless plug with my extension for UUID v1 that implements
extract and create from (and an opclass):
https://github.com/pgnickb/uuid_v1_ops

In response to

  • Re: UUID v7 at 2023-08-31 18:51:35 from Andrey M. Borodin

Responses

  • Re: UUID v7 at 2023-10-09 18:11:07 from Jelte Fennema

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-10-09 17:38:01 Re: Making aggregate deserialization (and WAL receive) functions slightly faster
Previous Message David G. Johnston 2023-10-09 16:30:22 Re: Fix output of zero privileges in psql