Re: pgsql: Add option to use ICU as global locale provider

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Add option to use ICU as global locale provider
Date: 2022-03-18 19:28:58
Message-ID: 7960418a-b5ac-8a53-bf45-dec2b48e01e9@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 18.03.22 10:27, Julien Rouhaud wrote:
> I'm attaching a patch that fixes both issues for me with ICU 50. Note that
> there's already a test that would have failed for CREATE DATABASE if initdb
> tests didn't fail first, so no new test needed.
>
> I ended up copy/pasting icu_set_collation_attributes() in initdb.c. There
> shouldn't be new attributes added in old ICU versions, and there are enough
> differences to make it work in the frontend that it didn't seems worth to have
> a single function.

Another option is that we just don't do the check in initdb. As the
tests show, you will then get an error from the backend call, so it's
really just a question of when the error is reported.

Why does your patch introduce a function check_icu_locale() that is only
called once? Did you have further plans for that?

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2022-03-18 19:30:21 Re: pgsql: Add option to use ICU as global locale provider
Previous Message Tom Lane 2022-03-18 17:29:41 Re: pgsql: Add option to use ICU as global locale provider

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2022-03-18 19:30:21 Re: pgsql: Add option to use ICU as global locale provider
Previous Message Stephen Frost 2022-03-18 19:23:21 Re: Proposal: Support custom authentication methods using hooks