Commit 13a57710 authored by Peter Eisentraut's avatar Peter Eisentraut

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.
parent 7d4a1838
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment