postgresql 建立索引:ERROR: operator class "gin_trgm_ops" does not exist for access method "gin"

g_trgm is an extension, so:sql

CREATE EXTENSION pg_trgm;

If you get the following errorpost

ERROR: could not open extension control file ".../extension/pg_trgm.control":
No such file or directory"postgresql

then you need to install the module for your operating systemcode

  • Ubuntu/Debian:get

    sudo apt install postgresql-contrib
  • Redhat/Centosio

    sudo yum install postgresql10-contrib
  • Fedoramodule

    sudo dnf install postgresql-contrib
相關文章
相關標籤/搜索