Re: Support UUIDv6 in uuid_extract_timestamp() - Mailing list pgsql-hackers

From Miłosz Bieniek
Subject Re: Support UUIDv6 in uuid_extract_timestamp()
Date
Msg-id 2udO1NOFp85l2YgakmdxlSFHD-vpDXvui0oVb0RtTv-UJl1rz_zJfibRIAdvvqr5Rtq_kJd9j2AnLn1b6QnCVxrBX8m7BhFnAMQOPo9vTzY=@proton.me
Whole thread
In response to Support UUIDv6 in uuid_extract_timestamp()  ("Tristan Partin" <tristan@partin.io>)
List pgsql-hackers
Hi,

On Sunday, 26 July 2026 at 18:05, Tristan Partin <tristan@partin.io> wrote:

> UUIDv6 is the same as UUIDv1 with some fields reordered. We already
> supported UUIDv1, so let's add support for UUIDv6. Previously, calls to
> uuid_extract_timestamp() would return NULL for UUIDv6 values.

Makes sense, this would be the last missing piece in uuid_extract_timestamp(). The code itself looks good.

> Patch 2 only adds comments. I think the bit manipulation is worthy of
> comments, but others may disagree.

I think it's a good idea. Now it's much easier to understand what's going on with these wild manipulations.



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [DESIGN] Soft DROP TABLE, recoverable drops for PostgreSQL
Next
From: Michael Paquier
Date:
Subject: Re: pg_rewind does not rewind diverging timelines