On Tue, 2026-10-27 at 20:50 +0100, Peter Eisentraut wrote: > There have been various reports over time that ICU collations that > reorder digits are buggy. These are collations defined like > > CREATE COLLATION digitslast (provider = icu, locale = 'en-u-kr-latn-digit'); > > (which means, move digits after Latin letters). > > This issue was reported upstream to ICU: > > https://unicode-org.atlassian.net/browse/ICU-23016 > > This issue was finally fixed in ICU 79, which came out a few days ago. > I have confirmed that the PostgreSQL issue is fixed with that new version. > > The question now is whether there is anything else we want to do about this? > > Here are some things we could do: > > 0. Do nothing. Leave the ICU bug and possibly this email as reference > and recommend that users don't use the affected kinds of ICU locales > with the affected older ICU versions. > > 1. We could check when a ICU collator object is created > (create_pg_locale_icu()) whether the locale contains digits reordering > and error out if an affected older ICU version is used. > > 1.a) The same but only for future PostgreSQL versions (no backpatch). > > [...] > > The last two are probably too much effort to make something work that > never worked to begin with. But I think it's worth contemplating > whether we want to do item 1, check explicitly for this bug and prevent > users running into it by accident. This is feasible now that we know > the precise cause and fix.
Option 1 is appealing, but it would prevent upgrading a database with such a collation. That wouldn't be good. Perhaps a warning would be good enough? Yours, Laurenz Albe
