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: Fri, 24 Mar 2023 10:10:35 +0100
Message-ID: <04182066-7655-344a-b8b7-040b1b2490fb@enterprisedb.com> (raw)
In-Reply-To: <6880701fd5cd5183ad7ff3a73d5c9291d6c2e331.camel@j-davis.com>
References: <11b1eeb7e7667fdd4178497aeb796c48d26e69b9.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>
	<1569fa4c-aded-57c4-eb07-3bcf03c5e423@enterprisedb.com>
	<60da0cecfb512a78b8666b31631a636215d8ce73.camel@j-davis.com>
	<20a2f13f652e6252531a449508e8a8be31d7664f.camel@j-davis.com>
	<7d77abd7767baaf30445e83415b428aa3eb54631.camel@j-davis.com>
	<9afa6dbe0d31053ad265aeba488fde784fd5b7ab.camel@j-davis.com>
	<b29cdc9b-1176-4456-e909-8fd64af03af8@enterprisedb.com>
	<c6dd63de8267ad8267ce4ec939f72c43f1fc2020.camel@j-davis.com>
	<7ee414ad-deb5-1144-8a0e-b34ae3b71cd5@enterprisedb.com>
	<4efdd7bdf9c811e1a32b8d10524bae8040367068.camel@j-davis.com>
	<6880701fd5cd5183ad7ff3a73d5c9291d6c2e331.camel@j-davis.com>

On 24.03.23 07:39, Jeff Davis wrote:
> On Thu, 2023-03-23 at 10:16 -0700, Jeff Davis wrote:
>> I could get rid of the SQL-callable function and move the rest of the
>> changes into 0006. I'll see if that arrangement works better, and
>> that
>> way we can add the SQL-callable function later (or perhaps not at all
>> if it's not desired).
> 
> Attached a new series that doesn't include the SQL-callable function.
> It's probably better to just wait and see what functions seem actually
> useful to users.
> 
> I included a new small patch to fix a potential UCollator leak and make
> the errors more consistent.

[PATCH v8 1/4] Avoid potential UCollator leak for older ICU versions.

Couldn't we do this in a simpler way by just freeing the collator before 
the ereport() calls.  Or wrap a PG_TRY/PG_FINALLY around the whole thing?

It would be nicer to not make the callers of 
icu_set_collation_attributes() responsible for catching and reporting 
the errors.


[PATCH v8 2/4] initdb: emit message when using default ICU locale.

I'm not able to make initdb print this message.  Under what 
circumstances am I supposed to see this?  Do you have some examples?

The function check_icu_locale() has now gotten a lot more functionality 
than its name suggests.  Maybe the part that assigns the default ICU 
locale should be moved up one level to setlocales(), which has a better 
name and does something similar for the libc locale realm.


[PATCH v8 3/4] Canonicalize ICU locale names to language tags.

I'm still on the fence about whether we actually want to do this, but 
I'm warming up to it, now that the issues with pre-54 versions are fixed.

But if we do this, the documentation needs to be updated.  There is a 
bunch of text there that says, like, you can do this format or that 
format, whatever you like.  At least the guidance should be changed there.


[PATCH v8 4/4] Validate ICU locales.

I would make icu_locale_validation true by default.

Or maybe it should be a log-level type option, so you can set it to 
error, warning, and also completely off?





view thread (46+ messages)  latest in thread

Message-ID: <04182066-7655-344a-b8b7-040b1b2490fb@enterprisedb.com>
Permalink:  ../04182066-7655-344a-b8b7-040b1b2490fb@enterprisedb.com/
Also on:    postgresql.org/message-id/04182066-7655-344a-b8b7-040b1b2490fb@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: <04182066-7655-344a-b8b7-040b1b2490fb@enterprisedb.com>
  References: <11b1eeb7e7667fdd4178497aeb796c48d26e69b9.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> <1569fa4c-aded-57c4-eb07-3bcf03c5e423@enterprisedb.com> <60da0cecfb512a78b8666b31631a636215d8ce73.camel@j-davis.com> <20a2f13f652e6252531a449508e8a8be31d7664f.camel@j-davis.com> <7d77abd7767baaf30445e83415b428aa3eb54631.camel@j-davis.com> <9afa6dbe0d31053ad265aeba488fde784fd5b7ab.camel@j-davis.com> <b29cdc9b-1176-4456-e909-8fd64af03af8@enterprisedb.com> <c6dd63de8267ad8267ce4ec939f72c43f1fc2020.camel@j-davis.com> <7ee414ad-deb5-1144-8a0e-b34ae3b71cd5@enterprisedb.com> <4efdd7bdf9c811e1a32b8d10524bae8040367068.camel@j-davis.com> <6880701fd5cd5183ad7ff3a73d5c9291d6c2e331.camel@j-davis.com> <04182066-7655-344a-b8b7-040b1b2490fb@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