agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Masahiko Sawada <msawada@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Support UUIDv6 in uuid_extract_timestamp().
Date: Tue, 04 Aug 2026 17:57:56 +0000
Message-ID: <E1wrJOm-00000000CL5-3yAU@gemulon.postgresql.org> (raw)
Support UUIDv6 in uuid_extract_timestamp().
Previously, uuid_extract_timestamp() returned NULL for UUIDv6 values,
even though it already extracted timestamps from UUIDv1 and
UUIDv7.
This commit adds a UUIDv6 branch that reassembles the timestamp from
that layout and then converts it exactly as the UUIDv1 branch does. We
provide no uuidv6() generator, but such values can be produced by
client applications and stored in the database, just as UUIDv1 values
already are.
Author: Tristan Partin <tristan@partin.io>
Reviewed-by: MiĆosz Bieniek <bieniek.milosz@proton.me>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Discussion: https://postgr.es/m/DJHJW50YWKIT.XIOT4NOZRQ03@partin.io
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/451871b740d7ad252b8aeaf16a20bcf831a39254
Modified Files
--------------
doc/src/sgml/func/func-uuid.sgml | 2 +-
src/backend/utils/adt/uuid.c | 17 +++++++++++++++++
src/test/regress/expected/uuid.out | 6 ++++++
src/test/regress/sql/uuid.sql | 1 +
4 files changed, 25 insertions(+), 1 deletion(-)
Message-ID: <E1wrJOm-00000000CL5-3yAU@gemulon.postgresql.org>
Permalink: ../E1wrJOm-00000000CL5-3yAU@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wrJOm-00000000CL5-3yAU@gemulon.postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: msawada@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Support UUIDv6 in uuid_extract_timestamp().
In-Reply-To: <E1wrJOm-00000000CL5-3yAU@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox