pgsql: Allow tailoring of ICU locales with custom rules

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Allow tailoring of ICU locales with custom rules
Date: 2023-03-08 16:03:22
Message-ID: E1pZwGA-002X1G-4w@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Allow tailoring of ICU locales with custom rules

This exposes the ICU facility to add custom collation rules to a
standard collation.

New options are added to CREATE COLLATION, CREATE DATABASE, createdb,
and initdb to set the rules.

Reviewed-by: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Reviewed-by: Daniel Verite <daniel(at)manitou-mail(dot)org>
Discussion: https://www.postgresql.org/message-id/flat/821c71a4-6ef0-d366-9acf-bb8e367f739f(at)enterprisedb(dot)com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/30a53b792959b36f07200dae246067b3adbcc0b9

Modified Files
--------------
doc/src/sgml/catalogs.sgml | 18 +++++
doc/src/sgml/ref/create_collation.sgml | 22 ++++++
doc/src/sgml/ref/create_database.sgml | 14 ++++
doc/src/sgml/ref/createdb.sgml | 10 +++
doc/src/sgml/ref/initdb.sgml | 10 +++
src/backend/catalog/pg_collation.c | 5 ++
src/backend/commands/collationcmds.c | 23 +++++-
src/backend/commands/dbcommands.c | 51 ++++++++++++-
src/backend/utils/adt/pg_locale.c | 41 +++++++++-
src/backend/utils/init/postinit.c | 11 ++-
src/bin/initdb/initdb.c | 15 +++-
src/bin/pg_dump/pg_dump.c | 37 +++++++++
src/bin/psql/describe.c | 100 ++++++++++++++++---------
src/bin/scripts/createdb.c | 11 +++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_collation.h | 2 +
src/include/catalog/pg_database.dat | 2 +-
src/include/catalog/pg_database.h | 3 +
src/include/utils/pg_locale.h | 1 +
src/test/regress/expected/collate.icu.utf8.out | 30 ++++++++
src/test/regress/expected/psql.out | 18 ++---
src/test/regress/sql/collate.icu.utf8.sql | 13 ++++
22 files changed, 380 insertions(+), 59 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2023-03-08 17:42:35 pgsql: 001_libpq_pipeline.pl: use Test::Differences if available
Previous Message Peter Eisentraut 2023-03-08 14:58:29 pgsql: Clean up comments

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2023-03-08 16:05:16 Re: Allow tailoring of ICU locales with custom rules
Previous Message Takamichi Osumi (Fujitsu) 2023-03-08 15:54:36 RE: Rework LogicalOutputPluginWriterUpdateProgress