mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Fix assertion failure in CREATE DATABASE
An assertion would fail when creating a database with libc locale provider from a template database with icu locale provider. Reported-by: Marina Polyakova <m.polyakova@postgrespro.ru> Reviewed-by: Julien Rouhaud <rjuju123@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/f385ba25e7f8be427b8c582e5cca7d79%40postgrespro.ru#515a31c5429d6d37ad1d5c9d66962a1e
This commit is contained in:
@ -1011,10 +1011,10 @@ createdb(ParseState *pstate, const CreatedbStmt *stmt)
|
||||
dbcollate = src_collate;
|
||||
if (dbctype == NULL)
|
||||
dbctype = src_ctype;
|
||||
if (dbiculocale == NULL)
|
||||
dbiculocale = src_iculocale;
|
||||
if (dblocprovider == '\0')
|
||||
dblocprovider = src_locprovider;
|
||||
if (dbiculocale == NULL && dblocprovider == COLLPROVIDER_ICU)
|
||||
dbiculocale = src_iculocale;
|
||||
|
||||
/* Some encodings are client only */
|
||||
if (!PG_VALID_BE_ENCODING(encoding))
|
||||
|
Reference in New Issue
Block a user