From: Julien Rouhaud <rjuju123@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Add option to use ICU as global locale provider
Date: Sat, 19 Mar 2022 12:14:59 +0800
Message-ID: <20220319041459.qqqiqh335sga5ezj@jrouhaud> (raw)
In-Reply-To: <20220318220959.pc4hpdmat6gbcdc2@alap3.anarazel.de>
References: <E1nUnH5-0006aR-MX@gemulon.postgresql.org>
<YjPn5+Y9Gj58PlEW@paquier.xyz>
<20220318031244.tu3wwlyxxabzq3iu@jrouhaud>
<CA+hUKGK1rLK_4jGbRWiXMx_nrH4NzS6FqXF0sZxGivrQYMh1EA@mail.gmail.com>
<20220318063648.4ja6rxlyzvc3viio@jrouhaud>
<20220318074051.n46mkwp2zkbxeesf@jrouhaud>
<20220318092749.363m4uv6rq24lctz@jrouhaud>
<7960418a-b5ac-8a53-bf45-dec2b48e01e9@enterprisedb.com>
<20220318220959.pc4hpdmat6gbcdc2@alap3.anarazel.de>
On Fri, Mar 18, 2022 at 03:09:59PM -0700, Andres Freund wrote:
> Hi,
>
> On 2022-03-18 20:28:58 +0100, Peter Eisentraut wrote:
> > Why does your patch introduce a function check_icu_locale() that is only
> > called once? Did you have further plans for that?
>
> I like that it moves ICU code out of dbcommands.c
Yes, it seemed cleaner this way. But more importantly code outside pg_locale.c
really shouldn't have to deal with ICU specific version code.
I'm attaching a v2, addressing Peter and Tom comments to not duplicate the old
ICU versions attribute function. I removed the ICU locale check entirely (for
consistency across ICU version) thus removing any need for ucol.h include in
initdb.
For the problem you reported at [1] with the meson branch, I changed createdb
tests with s/en-u-kf-upper/en@colCaseFirst=upper/, as older ICU versions don't
understand the former notation. check-world now pass for me, using either ICU
< 54 or >= 54.
> imo there should be few
> calls to ICU functions outside of pg_locale.c. There might be an argument for
> moving *more* into such a function though.
I think it would be a good improvement. I can work on that next week if
needed.
[1] https://www.postgresql.org/message-id/20220318000140.vzri3qw3p4aebn5p@alap3.anarazel.deAttachments:
v2-0001-Fix-global-icu-collations-for-ICU-54.patch (text/plain, 0B) download
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: rjuju123@gmail.com, andres@anarazel.de, peter.eisentraut@enterprisedb.com, thomas.munro@gmail.com, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Add option to use ICU as global locale provider
In-Reply-To: <20220319041459.qqqiqh335sga5ezj@jrouhaud>
References: <E1nUnH5-0006aR-MX@gemulon.postgresql.org> <YjPn5+Y9Gj58PlEW@paquier.xyz> <20220318031244.tu3wwlyxxabzq3iu@jrouhaud> <CA+hUKGK1rLK_4jGbRWiXMx_nrH4NzS6FqXF0sZxGivrQYMh1EA@mail.gmail.com> <20220318063648.4ja6rxlyzvc3viio@jrouhaud> <20220318074051.n46mkwp2zkbxeesf@jrouhaud> <20220318092749.363m4uv6rq24lctz@jrouhaud> <7960418a-b5ac-8a53-bf45-dec2b48e01e9@enterprisedb.com> <20220318220959.pc4hpdmat6gbcdc2@alap3.anarazel.de> <20220319041459.qqqiqh335sga5ezj@jrouhaud>
* 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