pgsql: Don't copy datlocale from template unless provider matches.

From: Jeff Davis <jdavis(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Don't copy datlocale from template unless provider matches.
Date: 2025-08-05 16:25:44
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Don't copy datlocale from template unless provider matches.

During CREATE DATABASE, if changing the locale provider, require that
a new locale is specified rather than trying to reinterpret the
template's locale using the new provider.

This only affects the behavior when the template uses the builtin
provider and CREATE DATABASE specifies the ICU provider without
specifying the locale. Previously, that may have succeeded due to
loose validation by ICU, whereas now that will cause an error. Because
it can cause an error, backport only to unreleased versions.

Discussion: https://postgr.es/m/[email protected]
Backpatch-through: 18

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/295a39770e6f7d9c117d52f86ff0596b7d9a590e

Modified Files
--------------
src/backend/commands/dbcommands.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Jeff Davis 2025-08-05 16:25:51 pgsql: Don't copy datlocale from template unless provider matches.
Previous Message Tom Lane 2025-08-05 16:11:43 pgsql: Mop-up for commit e035863c9.