Re: pgsql: Add option to use ICU as global locale provider
Julien Rouhaud <rjuju123@gmail.com>
From: Julien Rouhaud <rjuju123@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>, Thomas Munro <thomas.munro@gmail.com>, Michael Paquier <michael@paquier.xyz>, pgsql-hackers@lists.postgresql.org
Date: 2022-03-19T04:14:59Z
Lists: pgsql-hackers
Attachments
- v2-0001-Fix-global-icu-collations-for-ICU-54.patch (text/plain)
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.de
Commits
-
psql: fix \l display for pre-v15 databases.
- 7129a9791eaf 15.0 landed
-
Fix global ICU collations for ICU < 54
- 3a671e1f7cb8 15.0 landed
-
Add option to use ICU as global locale provider
- f2553d43060e 15.0 cited
-
Add support for collation attributes on older ICU versions
- b8f9a2a69a27 12.0 cited