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 <[email protected]> Reviewed-by: MiĆosz Bieniek <[email protected]> Reviewed-by: Masahiko Sawada <[email protected]> Discussion: https://postgr.es/m/[email protected] Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/3f2fdd150eb04fe1da60e2a99f4ba2dd2be6443b Modified Files -------------- src/backend/utils/adt/uuid.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)
