pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Jeff Davis <pgsql@j-davis.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: ICU locale validation / canonicalization
Date: Mon, 13 Mar 2023 08:25:46 +0100
Message-ID: <857da8b1-2a1e-a2be-7df9-7f5e85a3bcb7@enterprisedb.com> (raw)
In-Reply-To: <c15981f01fba3c0cbcdb49a6d43cdf0a90cd77ff.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>

On 09.03.23 21:17, Jeff Davis wrote:
>> Personally, I'm not on board with this behavior:
>>
>> => CREATE COLLATION test (provider = icu, locale =
>> 'de@collation=phonebook');
>> NOTICE:  00000: using language tag "de-u-co-phonebk" for locale
>> "de@collation=phonebook"
>>
>> I mean, maybe that is a thing we want to do somehow sometime, to
>> migrate
>> people to the "new" spellings, but the old ones aren't wrong.
> 
> I see what you mean; I'm not sure the best thing to do here. We are
> adjusting the string passed by the user, and it feels like some users
> might want to know that. It's a NOTICE, not a WARNING, so it's not
> meant to imply that it's wrong.

For clarification, I wasn't complaining about the notice, but about the 
automatic conversion from old-style ICU locale ID to language tag.

>> It also doesn't appear to address
>> how to handle ICU before version 54.
> 
> Do you have a specific concern here?

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.





view thread (46+ messages)  latest in thread

Message-ID: <857da8b1-2a1e-a2be-7df9-7f5e85a3bcb7@enterprisedb.com>
Permalink:  ../857da8b1-2a1e-a2be-7df9-7f5e85a3bcb7@enterprisedb.com/
Also on:    postgresql.org/message-id/857da8b1-2a1e-a2be-7df9-7f5e85a3bcb7@enterprisedb.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: peter.eisentraut@enterprisedb.com, pgsql@j-davis.com, robertmhaas@gmail.com
  Subject: Re: ICU locale validation / canonicalization
  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>

* 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