Re: pgsql: Handle the "und" locale in ICU versions 54 and older.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <jdavis(at)postgresql(dot)org>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Handle the "und" locale in ICU versions 54 and older.
Date: 2023-03-23 17:25:41
Message-ID: 1862096.1679592341@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Jeff Davis <jdavis(at)postgresql(dot)org> writes:
> Handle the "und" locale in ICU versions 54 and older.
> The "und" locale is an alternative spelling of the root locale, but it
> was not recognized until ICU 55. To maintain common behavior across
> all supported ICU versions, check for "und" and replace with "root"
> before opening.

> Previously, the lack of support for "und" was dangerous, because
> versions 54 and older fall back to the environment when a locale is
> not found. If the user specified "und" for the language (which is
> expected and documented), it could not only resolve to the wrong
> collator, but it could unexpectedly change (which could lead to
> corrupt indexes).

Hmm, should we back-patch this? Seems like existing branches would
be even more at risk than v16, because more likely to be built with
old ICU. OTOH, we do also run the risk of breaking installations
that weren't broken before.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Geoghegan 2023-03-23 18:17:24 pgsql: Count updates that move row to a new page.
Previous Message Jeff Davis 2023-03-23 17:09:50 pgsql: Handle the "und" locale in ICU versions 54 and older.