From: Jeff Davis <jdavis@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix CREATE DATABASE when template0 has ICU rules.
Date: Thu, 19 Nov 2026 04:04:48 +0000
Message-ID: <E1xTtOB-00000000Kif-3l8n@gemulon.postgresql.org> (raw)
Fix CREATE DATABASE when template0 has ICU rules.
Most fields, when not specified by the CREATE DATABASE command, are
simply copied from the template. But when the template has ICU rules,
and the new database uses a different provider (which is only possible
with template0), then we should ignore the ICU rules from the
template. But after commit 2d819a08a1, it tried to copy the ICU rules,
and the command resulted in an error.
This commit restores the prior behavior, which ignores the ICU rules
from the template if the new provider is not ICU.
Author: shihao zhong <zhong950419@gmail.com>
Reported-by: Heikki Linnakangas <hlinnaka@iki.fi>
Discussion: https://postgr.es/m/c97d5993-5d9f-4f75-97f1-7e69643e37c0@iki.fi
Backpatch-through: 17
Branch
------
REL_18_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/ede2e7e47c3b0aa384b3f67f3fe3584ca0c57009
Modified Files
--------------
src/backend/commands/dbcommands.c | 2 +-
src/test/icu/t/010_database.pl | 44 +++++++++++++++++++++++++++++++++++++++
2 files changed, 45 insertions(+), 1 deletion(-)
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: Fix CREATE DATABASE when template0 has ICU rules.
In-Reply-To: <E1xTtOB-00000000Kif-3l8n@gemulon.postgresql.org>
References: <E1xTtOB-00000000Kif-3l8n@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