From: Jeff Davis <jdavis@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Validate ICU locales.
Date: Tue, 28 Mar 2023 23:35:18 +0000
Message-ID: <E1phIqT-000EIX-Is@gemulon.postgresql.org> (raw)
Validate ICU locales.
For ICU collations, ensure that the locale's language exists in ICU,
and that the locale can be opened.
Basic validation helps avoid minor mistakes and misspellings, which
often fall back to the root locale instead of the intended
locale. It's even more important to avoid such mistakes in ICU
versions 54 and earlier, where the same (misspelled) locale string
could fall back to different locales depending on the environment.
Discussion: https://postgr.es/m/11b1eeb7e7667fdd4178497aeb796c48d26e69b9.camel@j-davis.com
Discussion: https://postgr.es/m/df2efad0cae7c65180df8e5ebb709e5eb4f2a82b.camel@j-davis.com
Reviewed-by: Peter Eisentraut
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/1671f990dd669c0b72e45c7bef0fd579a10676ed
Modified Files
--------------
doc/src/sgml/config.sgml | 26 ++++++++++
src/backend/commands/collationcmds.c | 2 +
src/backend/commands/dbcommands.c | 2 +-
src/backend/utils/adt/pg_locale.c | 70 +++++++++++++++++++++++---
src/backend/utils/misc/guc_tables.c | 26 ++++++++++
src/backend/utils/misc/postgresql.conf.sample | 3 ++
src/bin/initdb/initdb.c | 58 ++++++++++++++++++++-
src/bin/initdb/t/001_initdb.pl | 18 +++++++
src/include/utils/pg_locale.h | 4 +-
src/test/regress/expected/collate.icu.utf8.out | 9 +++-
src/test/regress/sql/collate.icu.utf8.sql | 5 +-
11 files changed, 210 insertions(+), 13 deletions(-)
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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: jdavis@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Validate ICU locales.
In-Reply-To: <E1phIqT-000EIX-Is@gemulon.postgresql.org>
* 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