Re: Support UUIDv6 in uuid_extract_timestamp()

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Tristan Partin <tristan(at)partin(dot)io>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Support UUIDv6 in uuid_extract_timestamp()
Date: 2026-06-24 23:29:22
Message-ID: CAD21AoAXtoYkARbwj9OaNrjo4E4MOceaKixAOQAO-Z2r=Yq5uA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 24, 2026 at 1:10 PM Tristan Partin <tristan(at)partin(dot)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.
>
> Patch 2 only adds comments. I think the bit manipulation is worthy of
> comments, but others may disagree.

Thank you for the patch!

The patch seems reasonable to me. I'll review the patch in depth.

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ben Mejia 2026-06-24 23:37:19 Re: Adjusting hash join memory limit to handle batch explosion
Previous Message Baji Shaik 2026-06-24 23:22:20 Re: uuidv7 improperly accepts dates before 1970-01-01