Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit544b452

Browse files
committed
Disallow specifying ICU rules unless locale provider is ICU
Follow-up for30a53b7; this was not checked in all cases.Reported-by: Jeff Davis <pgsql@j-davis.com>
1 parentb6dfee2 commit544b452

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

‎src/backend/commands/collationcmds.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,11 @@ DefineCollation(ParseState *pstate, List *names, List *parameters, bool if_not_e
271271
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
272272
errmsg("nondeterministic collations not supported with this provider")));
273273

274+
if (collicurules&&collprovider!=COLLPROVIDER_ICU)
275+
ereport(ERROR,
276+
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
277+
errmsg("ICU rules cannot be specified unless locale provider is ICU")));
278+
274279
if (collprovider==COLLPROVIDER_ICU)
275280
{
276281
#ifdefUSE_ICU

‎src/backend/commands/dbcommands.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,6 +1066,11 @@ createdb(ParseState *pstate, const CreatedbStmt *stmt)
10661066
ereport(ERROR,
10671067
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
10681068
errmsg("ICU locale cannot be specified unless locale provider is ICU")));
1069+
1070+
if (dbicurules)
1071+
ereport(ERROR,
1072+
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
1073+
errmsg("ICU rules cannot be specified unless locale provider is ICU")));
10691074
}
10701075

10711076
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp