From: Jeff Davis <pgsql@j-davis.com>
To: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Subject: Re: pgsql: Allow tailoring of ICU locales with custom rules
Date: Tue, 22 Aug 2023 10:25:29 -0700
Message-ID: <0aa4f0301450f75b4a57a17bb4d652aee99eeb41.camel@j-davis.com> (raw)
In-Reply-To: <afdffbd9-98ee-ea03-9640-301463317bc1@eisentraut.org>
References: <E1pZwGA-002X1G-4w@gemulon.postgresql.org>
<36a6e89689716c2ca1fae8adc8e84601a041121c.camel@j-davis.com>
<ad36444d-a2ea-7874-68df-34bd22391c3f@enterprisedb.com>
<CAA4eK1JLBx18GJyAQ8nv-bnEDqEgmpgSVQtadV_wcSfbQZOs5Q@mail.gmail.com>
<afdffbd9-98ee-ea03-9640-301463317bc1@eisentraut.org>
On Mon, 2023-08-14 at 10:34 +0200, Peter Eisentraut wrote:
> I have investigated this. My assessment is that how PostgreSQL
> interfaces with ICU is correct. Whether what ICU does is correct
> might
> be debatable. I have filed a bug with ICU about this:
> https://unicode-org.atlassian.net/browse/ICU-22456 , but there is no
> response yet.
Is everything other than the language and region simply discarded when
a rules string is present, or are some attributes preserved, or is
there some other nuance?
> You can work around this by including the desired attributes in the
> rules string, for example
>
> create collation c3 (provider=icu,
> locale='und-u-ka-shifted-ks-level1',
> rules='[alternate shifted][strength 1]',
> deterministic=false);
>
> So I don't think there is anything we need to do here for PostgreSQL
> 16.
Is there some way we can warn a user that some attributes will be
discarded, or improve the documentation? Letting the user figure this
out for themselves doesn't seem right.
Are you sure we want to allow rules for the database default collation
in 16, or should we start with just allowing them in CREATE COLLATION
and then expand to the database default collation later? I'm still a
bit concerned about users getting too fancy with daticurules, and
ending up not being able to connect to their database anymore.
Regards,
Jeff Davis
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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: pgsql@j-davis.com, peter@eisentraut.org, pgsql-hackers@postgresql.org, amit.kapila16@gmail.com
Subject: Re: pgsql: Allow tailoring of ICU locales with custom rules
In-Reply-To: <0aa4f0301450f75b4a57a17bb4d652aee99eeb41.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