Re: pgsql: Allow tailoring of ICU locales with custom rules - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: pgsql: Allow tailoring of ICU locales with custom rules
Date
Msg-id CAA4eK1+Rc-gX7RobePq4uteZFT2crxy7JG_SNyEvT7zWa6tPeg@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Allow tailoring of ICU locales with custom rules  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
On Tue, Aug 22, 2023 at 10:55 PM Jeff Davis <pgsql@j-davis.com> wrote:
>
> 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.
>

There is still an Open Item corresponding to this. Does anyone else
want to weigh in?

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Speaker Bureau
Next
From: Aleksander Alekseev
Date:
Subject: Re: Commitfest 2023-09 starts soon