Re: pgsql: Allow tailoring of ICU locales with custom rules

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgsql: Allow tailoring of ICU locales with custom rules
Date: 2023-07-24 02:46:43
Message-ID: CAA4eK1JLBx18GJyAQ8nv-bnEDqEgmpgSVQtadV_wcSfbQZOs5Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Fri, Mar 10, 2023 at 3:24 PM Peter Eisentraut
<peter(dot)eisentraut(at)enterprisedb(dot)com> wrote:
>
> On 08.03.23 21:57, Jeff Davis wrote:
>
> > * 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.
>

This thread is listed on PostgreSQL 16 Open Items list. This is a
gentle reminder to see if there is a plan to move forward with respect
to open points.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2023-07-24 04:50:01 pgsql: pgbench: Use COPY for client-side data generation
Previous Message Michael Paquier 2023-07-23 11:05:13 pgsql: pgbench: Add TAP tests to check consistency of data generated

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2023-07-24 02:47:00 Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids)
Previous Message Richard Guo 2023-07-24 02:45:44 Re: postgres_fdw: wrong results with self join + enable_nestloop off