Re: UUID v7 - Mailing list pgsql-hackers

From Marcos Pegoraro
Subject Re: UUID v7
Date
Msg-id CAB-JLwYDKz98U7PGVmkvND7ka9vgRM037T+Vhr6RL-WFFtn-hQ@mail.gmail.com
Whole thread Raw
In response to Re: UUID v7  (Andrey Borodin <x4mmm@yandex-team.ru>)
Responses Re: UUID v7
List pgsql-hackers
I understand your point, but 
'2000-01-01' :: timestamp and '1900-01-01' :: timestamp are both valid timestamps.

So looks strange if user can do
select uuidv7(TIMESTAMP '2000-01-01')
but cannot do
select uuidv7(TIMESTAMP '1900-01-01')

Regards
Marcos


Em qua., 24 de jan. de 2024 às 14:51, Andrey Borodin <x4mmm@yandex-team.ru> escreveu:


> On 24 Jan 2024, at 22:00, Marcos Pegoraro <marcos@f10.com.br> wrote:
>
> Is enough from 1970 ?
Per standard unix_ts_ms field is a number of milliseconds from UNIX start date 1970-01-01.

> How about if user wants to have an UUID of his birth date ?

I've claimed my
0078c135-bd00-70b1-865a-63c3741922a5

But again, UUIDs are not designed to store timestamp. They are unique and v7 promote data locality via time-ordering.


Best regards, Andrey Borodin.

pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: dblink query interruptibility
Next
From: Jelte Fennema-Nio
Date:
Subject: Re: UUID v7