Fix ICU locale option handling in CREATE DATABASE
The code took the LOCALE option as the default/fallback for ICU_LOCALE, but this was neither documented nor intended, so remove it. (It was probably left in from an earlier patch version.) Reported-by: Marina Polyakova <m.polyakova@postgrespro.ru> Discussion: https://www.postgresql.org/message-id/flat/f385ba25e7f8be427b8c582e5cca7d79%40postgrespro.ru#515a31c5429d6d37ad1d5c9d66962a1e
This commit is contained in:
parent
701ac2cb1f
commit
8b808f189f
|
@ -912,11 +912,6 @@ createdb(ParseState *pstate, const CreatedbStmt *stmt)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
|
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
|
||||||
errmsg("ICU locale cannot be specified unless locale provider is ICU")));
|
errmsg("ICU locale cannot be specified unless locale provider is ICU")));
|
||||||
if (dblocprovider == COLLPROVIDER_ICU && !dbiculocale)
|
|
||||||
{
|
|
||||||
if (dlocale && dlocale->arg)
|
|
||||||
dbiculocale = defGetString(dlocale);
|
|
||||||
}
|
|
||||||
if (distemplate && distemplate->arg)
|
if (distemplate && distemplate->arg)
|
||||||
dbistemplate = defGetBoolean(distemplate);
|
dbistemplate = defGetBoolean(distemplate);
|
||||||
if (dallowconnections && dallowconnections->arg)
|
if (dallowconnections && dallowconnections->arg)
|
||||||
|
|
Loading…
Reference in New Issue