pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Masahiko Sawada <msawada@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: doc: Clarify collation requirements for base32hex sortability.
Date: Fri, 27 Mar 2026 19:14:06 +0000
Message-ID: <E1w6CdB-001jcC-1u@gemulon.postgresql.org> (raw)

doc: Clarify collation requirements for base32hex sortability.

While fixing the base32hex UUID sortability test in commit
89210037a0a, it turned out that the expected lexicographical order is
only maintained under the C collation (or an equivalent byte-wise
collation). Natural language collations may employ different rules,
breaking the sortability.

This commit updates the documentation to explicitly state that
base32hex is "byte-wise sortable", ensuring users do not fall into the
trap of using natural language collations when querying their encoded
data.

Co-Authored-by: Andrey Borodin <x4mmm@yandex-team.ru>
Discussion: https://postgr.es/m/CAD21AoAwX1D6baSGuQXm0mzPXPWB07kgaoaaahjNHHenbdY24A@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e752a2ccc98f324e7013cc4eabc1998d5a1020d0

Modified Files
--------------
doc/src/sgml/func/func-binarystring.sgml | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)



Message-ID: <E1w6CdB-001jcC-1u@gemulon.postgresql.org>
Permalink:  ../E1w6CdB-001jcC-1u@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1w6CdB-001jcC-1u@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: doc: Clarify collation requirements for base32hex sortability.
  In-Reply-To: <E1w6CdB-001jcC-1u@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox