Re: Move defaults toward ICU in 16?
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: Tom Lane <tgl@sss.pgh.pa.us>, Thomas Munro <thomas.munro@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>, pgsql-hackers@postgresql.org
Date: 2023-02-08T20:16:46Z
Lists: pgsql-hackers
Attachments
- v1-0001-Use-ICU-by-default-at-initdb-time.patch (text/x-patch) patch v1-0001
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
Commits
-
Build ICU support by default.
- fcb21b3acdcb 16.0 landed
-
Use ICU by default at initdb time.
- 27b62377b47f 16.0 landed
-
pg_upgrade: copy locale and encoding information to new cluster.
- 9637badd9f92 16.0 landed