Re: ICU locale validation / canonicalization - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: ICU locale validation / canonicalization
Date
Msg-id 0d7c4115e3dd3581cec125207cbd72cab677c238.camel@j-davis.com
Whole thread Raw
In response to Re: ICU locale validation / canonicalization  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Responses Re: ICU locale validation / canonicalization  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
List pgsql-hackers
On Mon, 2023-03-13 at 08:25 +0100, Peter Eisentraut wrote:
> For clarification, I wasn't complaining about the notice, but about
> the
> automatic conversion from old-style ICU locale ID to language tag.

Canonicalization means that we pick one format, and automatically
convert to it, right?

> What we had discussed a while ago in one of these threads is that ICU
> before version 54 do not support keyword lists, and we have custom
> code
> to do that parsing ourselves, but we don't have code to do the same
> for
> language tags.  Therefore, if I understand this right, if we
> automatically convert ICU locale IDs to language tags, as shown
> above,
> then we break support for such locales in those older ICU versions.

Right. In versions 53 and earlier, and during pg_upgrade, we would just
preserve the locale string as entered.

Alternatively, we could canonicalize to the ICU format locale IDs. Or
add something to parse out the attributes from a language tag.

Regards,
    Jeff Davis




pgsql-hackers by date:

Previous
From: Gilles Darold
Date:
Subject: Re: [Proposal] Allow pg_dump to include all child tables with the root table
Next
From: Juan José Santamaría Flecha
Date:
Subject: Re: pg_dump/pg_restore: Fix stdin/stdout handling of custom format on Win32