mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-07 19:47:50 +08:00
Prohibit creating ICU collation with different ctype
ICU does not support "collate" and "ctype" being different, so the collctype catalog column is ignored. But for catalog neatness, ensure that they are the same.
This commit is contained in:
parent
7d4a1838ef
commit
13a57710db
@ -1354,6 +1354,11 @@ pg_newlocale_from_collation(Oid collid)
|
||||
UCollator *collator;
|
||||
UErrorCode status;
|
||||
|
||||
if (strcmp(collcollate, collctype) != 0)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("collations with different collate and ctype values are not supported by ICU")));
|
||||
|
||||
status = U_ZERO_ERROR;
|
||||
collator = ucol_open(collcollate, &status);
|
||||
if (U_FAILURE(status))
|
||||
|
Loading…
Reference in New Issue
Block a user