Re: UUID v7 - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: UUID v7
Date
Msg-id B4034B63-6C3F-46B1-A26F-23B4B8CC72D6@yandex-team.ru
Whole thread Raw
In response to Re: UUID v7  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: UUID v7
List pgsql-hackers

> On 19 Jan 2024, at 08:24, David G. Johnston <david.g.johnston@gmail.com> wrote:
>
>
> You are mixing POSIX and ISO-8601 conventions and, as noted in our appendix, they disagree on the direction that is
positive.

Thanks! Now everything seems on its place.

I want to include in the patch following tests:
-- extract UUID v1, v6 and v7 timestamp
SELECT uuid_extract_time('C232AB00-9414-11EC-B3C8-9F6BDECED846') = 'Tuesday, February 22, 2022 2:22:22.00 PM
GMT+05:00';
SELECT uuid_extract_time('1EC9414C-232A-6B00-B3C8-9F6BDECED846') = 'Tuesday, February 22, 2022 2:22:22.00 PM
GMT+05:00';
SELECT uuid_extract_time('017F22E2-79B0-7CC3-98C4-DC0C0C07398F') = 'Tuesday, February 22, 2022 2:22:22.00 PM
GMT+05:00';

How do you think, will it be stable all across buildfarm? Or should we change anything to avoid false positives
inferredfrom different timestamp parsing? 


> On 19 Jan 2024, at 07:58, Lukas Fittl <lukas@fittl.com> wrote:
>
> Note how calling the uuidv7 function again after having called it with a fixed future timestamp, returns the future
timestamp,even though it should return the current time. 

Thanks for the review.
Well, that was intentional. But now I see it's kind of confusing behaviour. I've changed it to more expected version.

Also, I've added some documentation on all functions.


Best regards, Andrey Borodin.

Attachment

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: subscription disable_on_error not working after ALTER SUBSCRIPTION set bad conninfo
Next
From: Konstantin Knizhnik
Date:
Subject: Re: index prefetching