mirror of
https://github.com/postgres/postgres.git
synced 2025-04-27 22:56:53 +03:00
Disallow specifying ICU rules unless locale provider is ICU
Follow-up for 30a53b7929; this was not checked in all cases. Reported-by: Jeff Davis <pgsql@j-davis.com>
This commit is contained in:
parent
b6dfee28f2
commit
544b452a5a
@ -271,6 +271,11 @@ DefineCollation(ParseState *pstate, List *names, List *parameters, bool if_not_e
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("nondeterministic collations not supported with this provider")));
|
||||
|
||||
if (collicurules && collprovider != COLLPROVIDER_ICU)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
|
||||
errmsg("ICU rules cannot be specified unless locale provider is ICU")));
|
||||
|
||||
if (collprovider == COLLPROVIDER_ICU)
|
||||
{
|
||||
#ifdef USE_ICU
|
||||
|
@ -1066,6 +1066,11 @@ createdb(ParseState *pstate, const CreatedbStmt *stmt)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
|
||||
errmsg("ICU locale cannot be specified unless locale provider is ICU")));
|
||||
|
||||
if (dbicurules)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
|
||||
errmsg("ICU rules cannot be specified unless locale provider is ICU")));
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user