pgsql: initdb: derive encoding from locale for ICU; similar to libc. - Mailing list pgsql-committers

From Jeff Davis
Subject pgsql: initdb: derive encoding from locale for ICU; similar to libc.
Date
Msg-id E1pahqh-002t5V-Ik@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
initdb: derive encoding from locale for ICU; similar to libc.

Previously, the default encoding was derived from the locale when
using libc; while the default was always UTF-8 when using ICU. That
would throw an error when the locale was not compatible with UTF-8.

This commit causes initdb to derive the default encoding from the
locale for both providers. If --no-locale is specified (or if the
locale is C or POSIX), the default encoding will be UTF-8 for ICU
(because ICU does not support SQL_ASCII) and SQL_ASCII for libc.

Per buildfarm failure on system "hoverfly" related to commit
27b62377b4.

Discussion: https://postgr.es/m/d191d5841347301a8f1238f609471ddd957fc47e.camel%40j-davis.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c45dc7ffbba2cb0bf180a0b9edadc22769143e7a

Modified Files
--------------
contrib/unaccent/meson.build           |  2 +-
doc/src/sgml/ref/initdb.sgml           | 20 +++++++++++++-------
src/bin/initdb/initdb.c                | 15 ++++++++-------
src/bin/pg_upgrade/t/002_pg_upgrade.pl | 15 +++++----------
src/bin/scripts/t/020_createdb.pl      |  2 +-
src/test/icu/t/010_database.pl         |  2 +-
6 files changed, 29 insertions(+), 27 deletions(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: Fix tests for non-ICU build
Next
From: Tom Lane
Date:
Subject: pgsql: Ensure COPY TO on an RLS-enabled table copies no more than it sh