pgsql: doc: Clarify collation requirements for base32hex sortability.

From: Masahiko Sawada <msawada(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: doc: Clarify collation requirements for base32hex sortability.
Date: 2026-03-27 19:14:06
Message-ID: E1w6CdB-001jcC-1u@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)yandex-team(dot)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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2026-03-27 19:39:04 pgsql: pgindent: ensure all C files end with a newline.
Previous Message Nathan Bossart 2026-03-27 15:17:53 pgsql: Add rudimentary table prioritization to autovacuum.