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: Add comments to uuid_extract_timestamp().
Date: Tue, 04 Aug 2026 20:41:14 +0000
Message-ID: <E1wrLwo-00000000DCl-0m1p@gemulon.postgresql.org> (raw)
Add comments to uuid_extract_timestamp().
The timestamp-reassembly expressions in uuid_extract_timestamp() are
chains of shifted octets whose shift counts encode the field layout of
each UUID version, which is not otherwise recoverable from the code.
This commit documents, for UUIDv1, UUIDv6, and UUIDv7 alike, which
octets carry which part of the timestamp and where each part lands in
the reassembled value, citing the RFC section that defines it.
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/3f2fdd150eb04fe1da60e2a99f4ba2dd2be6443b
Modified Files
--------------
src/backend/utils/adt/uuid.c | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
Message-ID: <E1wrLwo-00000000DCl-0m1p@gemulon.postgresql.org>
Permalink: ../E1wrLwo-00000000DCl-0m1p@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wrLwo-00000000DCl-0m1p@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: Add comments to uuid_extract_timestamp().
In-Reply-To: <E1wrLwo-00000000DCl-0m1p@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