pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <jdavis@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: initdb: derive encoding from locale for ICU; similar to libc.
Date: Fri, 10 Mar 2023 18:52:16 +0000
Message-ID: <E1pahqh-002t5V-Ik@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1pahqh-002t5V-Ik@gemulon.postgresql.org>
Permalink:  ../E1pahqh-002t5V-Ik@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pahqh-002t5V-Ik@gemulon.postgresql.org

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: jdavis@postgresql.org
  Subject: Re: pgsql: initdb: derive encoding from locale for ICU; similar to libc.
  In-Reply-To: <E1pahqh-002t5V-Ik@gemulon.postgresql.org>
  References: <E1pahqh-002t5V-Ik@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