From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Allow setting the collation strength in ICU tailoring rules
Date: Wed, 18 Mar 2026 08:11:58 +0000
Message-ID: <E1w2m0U-000IRA-0L@gemulon.postgresql.org> (raw)
Allow setting the collation strength in ICU tailoring rules
There was a bug that if you created an ICU collation with tailoring
rules, any strength specification inside the rules was ignored. This
was because we called ucol_openRules() with UCOL_DEFAULT_STRENGTH for
the strength argument, which overrides the strength. This was because
of faulty guidance in the ICU documentation, which has since been
fixed. The correct invocation is to use UCOL_DEFAULT for the strength
argument.
This fixes bug #18771 and bug #19425.
Author: Daniel Verite <daniel@manitou-mail.org>
Reported-by: Ruben Ruiz <ruben.ruizcuadrado@gmail.com>
Reported-by: dorian.752@live.fr
Reported-by: Todd Lang <Todd.Lang@D2L.com>
Discussion: https://www.postgresql.org/message-id/flat/YT2PPF959236618377A072745A280E278F4BE1DA@YT2PPF959236618....
Discussion: https://www.postgresql.org/message-id/flat/18771-98bb23e455b0f367@postgresql.org
Discussion: https://www.postgresql.org/message-id/flat/19425-58915e19dacd4f40%40postgresql.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/905e44152a1d49b90cb8d800dcaaba7981288ae2
Modified Files
--------------
src/backend/utils/adt/pg_locale_icu.c | 2 +-
src/test/regress/expected/collate.icu.utf8.out | 8 ++++++++
src/test/regress/sql/collate.icu.utf8.sql | 4 ++++
3 files changed, 13 insertions(+), 1 deletion(-)
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: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Allow setting the collation strength in ICU tailoring rules
In-Reply-To: <E1w2m0U-000IRA-0L@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