【发布时间】:2013-11-26 09:44:16
【问题描述】:
我想在uuid[] 上使用 GIN 索引(对 uuid 数组进行有效的成员资格测试)。但是,当我尝试它时,PostgreSQL 给了我一个错误:
mydb=> CREATE TABLE foo (val uuid[]);
CREATE TABLE
mydb=> CREATE INDEX foo_idx ON foo USING GIN(val);
ERROR: data type uuid[] has no default operator class for access method "gin"
HINT: You must specify an operator class for the index or define a default operator class for the data type.
如何添加必要的运算符类以使其正常工作?
请注意,this 与 citext 类型的问题类似,但提供的答案不起作用。
【问题讨论】:
标签: arrays postgresql indexing uuid