pgsql: Validate ICU locales. - Mailing list pgsql-committers

From Jeff Davis
Subject pgsql: Validate ICU locales.
Date
Msg-id E1phIqT-000EIX-Is@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: amcheck: In verify_heapam, allows tuples with xmin 0.
Next
From: Tomas Vondra
Date:
Subject: pgsql: pg_dump: Fix gzip compression of empty data