我在尝试执行脚本时遇到问题。这是场景:
-- Script to create collation
CREATE COLLATION case_insensitive
(PROVIDER = icu, LOCALE ='und-u-ks-level2', DETERMINISTIC = FALSE);
-- Followed by adding an index using the collation
CREATE UNIQUE INDEX col1_idx ON my_table (col1 case_insensitive);
遗憾的是,在索引过程中,我遇到了以下错误:
SQL Error [42704]: ERROR: operator class "case_insensitive" does not exist for access method "btree"
我已经检查过pg_opclass
表,但它不存在:
SELECT * FROM pg_opclass WHERE opcname = 'case_insensitive';
知道我在这里做错/错过了什么吗?如果您对此有任何见解或帮助,我将不胜感激。