Re: [PATCH] Fix ICU strength not being honored in collation rules

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "Luis Felippe" <luisfelippe(at)protonmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Fix ICU strength not being honored in collation rules
Date: 2025-10-28 21:37:37
Message-ID: 597890aa-cd73-4f6e-9d77-9cad6a5e3953@manitou-mail.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Luis Felippe wrote:

> This fix changes this call to pass UCOL_DEFAULT instead. This way,
> UCOL_TERTIARY is still specified by default, but the strength explicitly set
> on the rules string is not overwritten. This is important because there is
> currently no way to create a collation with custom tailoring rules with
> strengh other than tertiary.

Yes. There was a previous report recently [1], with a proposed fix [2]
identical to yours.

> As this only affects cases where the strength is explicitly set but was
> previously ignores, I do not think it is a breaking change.

The fix may change sort results for collations affected by the problem
(that's the point of the fix!), so even if it's for the better, it's
theorically
a breaking change for databases that may have collations like that.

[1]
https://www.postgresql.org/message-id/flat/YT2PPF959236618377A072745A280E278F4BE1DA(at)YT2PPF959236618(dot)CANPRD01(dot)PROD(dot)OUTLOOK(dot)COM

[2] https://commitfest.postgresql.org/patch/6084/

Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joel Jacobson 2025-10-28 21:45:57 Re: Optimize LISTEN/NOTIFY
Previous Message Nathan Bossart 2025-10-28 21:06:12 Re: another autovacuum scheduling thread