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

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-24 18:10:26
Message-ID: cb64fcc302ea562d31fce3efa89fc3991b908751.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Thu, 2023-03-23 at 13:25 -0400, Tom Lane wrote:
> 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.

I wondered the same thing[1] but ultimately figured the risk outweighed
the reward. My reasoning (which I didn't post before) was:

If a user currently has a collation with locale 'und', and ICU <= 54,
they are getting their actual locale from the environment. If we
backpatch, it will silently change their locale to be the root locale,
which could be different, and break their indexes. That seems too
dangerous for a minor release.

For a major release it's more tolerable to put something like that in
the release notes.

Fortunately, I think most users now are probably using the built-in
collations, or using the empty string before an "@" to specify the root
locale, which works in all ICU versions. Users would only specify it as
"und" if they happen to know about language tags.

Regards,
Jeff Davis

[1]
https://www.postgresql.org/message-id/9afa6dbe0d31053ad265aeba488fde784fd5b7ab.camel@j-davis.com

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2023-03-24 21:07:35 pgsql: Invent GENERIC_PLAN option for EXPLAIN.
Previous Message Andres Freund 2023-03-24 16:44:19 Re: pgsql: meson: add install-{quiet, world} targets