开发者社区> 问答> 正文

postgresql9.6版本,ERROR: data type uuid has no default operator class for access method "gin"

在postgresql9.6版本中,在uuid类型上建gin索引,提示如下错误:
MH=# create index idx_r_data_main_test_full on r_data_main_test using gin(data_id,parent_coll_id,fs_id,data_name,size,mode,uid,gid,create_ts,modify_ts);
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.
网上查看,说到postgres10版本才可以在uuid类型上建gin类型,在9.6版本中应该如何解决呢?

展开
收起
风一样的我 2017-11-17 21:50:18 4941 0
1 条回答
写回答
取消 提交回答
  • 在安装目录的 share/contrib 下面,可以找到 uuid-ossp.sql,使用以下命令:
    [c-sharp] view plain copy
    psql -d pisces -U postgres -f D:/Service/PostgreSQL/9.0/share/contrib/uuid-ossp.sql

    2019-07-17 21:44:15
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
云栖大会:开源 PolarDB 架构演进、关键技术与社区建设 立即下载
2023云栖大会:和客户一起玩转PolarDB新特性 立即下载
2023云栖大会:PolarDB for AI 立即下载