From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Jeff Davis <pgsql@j-davis.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: pgsql: Allow tailoring of ICU locales with custom rules
Date: Fri, 10 Mar 2023 10:54:14 +0100
Message-ID: <ad36444d-a2ea-7874-68df-34bd22391c3f@enterprisedb.com> (raw)
In-Reply-To: <36a6e89689716c2ca1fae8adc8e84601a041121c.camel@j-davis.com>
References: <E1pZwGA-002X1G-4w@gemulon.postgresql.org>
<36a6e89689716c2ca1fae8adc8e84601a041121c.camel@j-davis.com>
On 08.03.23 21:57, Jeff Davis wrote:
> On Wed, 2023-03-08 at 16:03 +0000, Peter Eisentraut wrote:
>> Allow tailoring of ICU locales with custom rules
>
> Late review:
>
> * Should throw error when provider != icu and rules != NULL
I have fixed that.
> * Explain what the example means. By itself, users might get confused
> wondering why someone would want to do that.
>
> * Also consider a more practical example?
I have added a more practical example with explanation.
> * It appears rules IS NULL behaves differently from rules=''. Is that
> desired? For instance:
> create collation c1(provider=icu,
> locale='und-u-ka-shifted-ks-level1',
> deterministic=false);
> create collation c2(provider=icu,
> locale='und-u-ka-shifted-ks-level1',
> rules='',
> deterministic=false);
> select 'a b' collate c1 = 'ab' collate c1; -- true
> select 'a b' collate c2 = 'ab' collate c2; -- false
I'm puzzled by this. The general behavior is, extract the rules of the
original locale, append the custom rules, use that. If the custom rules
are the empty string, that should match using the original rules
untouched. Needs further investigation.
> * Can you document the interaction between locale keywords
> ("@colStrength=primary") and a rule like '[strength 2]'?
I'll look into that.
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: peter.eisentraut@enterprisedb.com, pgsql@j-davis.com, pgsql-hackers@postgresql.org
Subject: Re: pgsql: Allow tailoring of ICU locales with custom rules
In-Reply-To: <ad36444d-a2ea-7874-68df-34bd22391c3f@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