Re: UUID v7 - Mailing list pgsql-hackers

From Nick Babadzhanian
Subject Re: UUID v7
Date
Msg-id CABw73UoHCDdzT=Yv5FkM-6F+ReHV4jaGVdzA-J6jN6FDQCZr2Q@mail.gmail.com
Whole thread Raw
In response to Re: UUID v7  ("Andrey M. Borodin" <x4mmm@yandex-team.ru>)
Responses Re: UUID v7
List pgsql-hackers
On Thu, 31 Aug 2023 at 23:10, Andrey M. Borodin <x4mmm@yandex-team.ru> wrote:
> Well, as far as I know, RFC discourages extracting timestamps from UUIDs. But we still can have such
functions...maybeas 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
pointershere.
 

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



pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Fix output of zero privileges in psql
Next
From: Tom Lane
Date:
Subject: Re: Making aggregate deserialization (and WAL receive) functions slightly faster