Re: Move defaults toward ICU in 16? - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Move defaults toward ICU in 16?
Date
Msg-id 337d581bae5d6253919f70acdfc184631f0ad41b.camel@j-davis.com
Whole thread Raw
In response to Re: Move defaults toward ICU in 16?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Move defaults toward ICU in 16?
List pgsql-hackers
On Thu, 2023-02-02 at 18:10 -0500, Tom Lane wrote:
> Yeah.  I would be resistant to making ICU a required dependency,
> but it doesn't seem unreasonable to start moving towards it being
> our default collation support.

Patch attached.

To get the default locale, the patch initializes a UCollator with NULL
for the locale name, and then queries it for the locale name. Then it's
converted to a language tag, which is consistent with the initial
collation import. I'm not sure that's the best way, but it seems
reasonable.

If it's a user-provided locale (--icu-locale=), then the patch leaves
it as-is, and does not convert it to a language tag (consistent with
CREATE COLLATION and CREATE DATABASE).

I opened another discussion about whether we want to try harder to
validate or canonicalize the locale name:

https://www.postgresql.org/message-id/11b1eeb7e7667fdd4178497aeb796c48d26e69b9.camel@j-davis.com

--
Jeff Davis
PostgreSQL Contributor Team - AWS



Attachment

pgsql-hackers by date:

Previous
From: "Bagga, Rishu"
Date:
Subject: Re: SLRUs in the main buffer pool - Page Header definitions
Next
From: Andres Freund
Date:
Subject: Re: SLRUs in the main buffer pool - Page Header definitions