pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <pgsql@j-davis.com>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: ICU locale validation / canonicalization
Date: Mon, 13 Mar 2023 08:31:46 -0700
Message-ID: <0d7c4115e3dd3581cec125207cbd72cab677c238.camel@j-davis.com> (raw)
In-Reply-To: <857da8b1-2a1e-a2be-7df9-7f5e85a3bcb7@enterprisedb.com>
References: <11b1eeb7e7667fdd4178497aeb796c48d26e69b9.camel@j-davis.com>
	<CA+Tgmob6mDjCCA-BL2oFOpdRdijkkVrQ09DuMBi0rV_2omPVmA@mail.gmail.com>
	<fccd3064fa38285d2b71c2cc46a3eae8e5c6d4fb.camel@j-davis.com>
	<CA+TgmoYJ7usps=Ln6fBisgGyVcgjwXxDxYhFyc=b+iZ1XRaU6A@mail.gmail.com>
	<33acfc3a772224d668042bd2cbef88e91704ce25.camel@j-davis.com>
	<6f32de82-88e2-480a-8421-07add8f5dee5@enterprisedb.com>
	<8c7af6820aed94dc7bc259d2aa7f9663518e6137.camel@j-davis.com>
	<4eebea80f528b1b5e381d6e834497bd6983e4e93.camel@j-davis.com>
	<899ab44a-4307-064f-0945-412723d57c02@enterprisedb.com>
	<c15981f01fba3c0cbcdb49a6d43cdf0a90cd77ff.camel@j-davis.com>
	<857da8b1-2a1e-a2be-7df9-7f5e85a3bcb7@enterprisedb.com>

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






view thread (46+ messages)  latest in thread

Message-ID: <0d7c4115e3dd3581cec125207cbd72cab677c238.camel@j-davis.com>
Permalink:  ../0d7c4115e3dd3581cec125207cbd72cab677c238.camel@j-davis.com/
Also on:    postgresql.org/message-id/0d7c4115e3dd3581cec125207cbd72cab677c238.camel@j-davis.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: pgsql@j-davis.com, peter.eisentraut@enterprisedb.com, robertmhaas@gmail.com
  Subject: Re: ICU locale validation / canonicalization
  In-Reply-To: <0d7c4115e3dd3581cec125207cbd72cab677c238.camel@j-davis.com>
  References: <11b1eeb7e7667fdd4178497aeb796c48d26e69b9.camel@j-davis.com> <CA+Tgmob6mDjCCA-BL2oFOpdRdijkkVrQ09DuMBi0rV_2omPVmA@mail.gmail.com> <fccd3064fa38285d2b71c2cc46a3eae8e5c6d4fb.camel@j-davis.com> <CA+TgmoYJ7usps=Ln6fBisgGyVcgjwXxDxYhFyc=b+iZ1XRaU6A@mail.gmail.com> <33acfc3a772224d668042bd2cbef88e91704ce25.camel@j-davis.com> <6f32de82-88e2-480a-8421-07add8f5dee5@enterprisedb.com> <8c7af6820aed94dc7bc259d2aa7f9663518e6137.camel@j-davis.com> <4eebea80f528b1b5e381d6e834497bd6983e4e93.camel@j-davis.com> <899ab44a-4307-064f-0945-412723d57c02@enterprisedb.com> <c15981f01fba3c0cbcdb49a6d43cdf0a90cd77ff.camel@j-davis.com> <857da8b1-2a1e-a2be-7df9-7f5e85a3bcb7@enterprisedb.com> <0d7c4115e3dd3581cec125207cbd72cab677c238.camel@j-davis.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox