I am using GIN indexes with the
pg_trgm module for indexing
varchar fields. So, to define an index I have to write something like this:
CREATE INDEX gin_field_idx ON table_name USING gin (field gin_trgm_ops);
If I exclude the operator class (
git_trgm_ops) and write:
CREATE INDEX gin_field_idx ON table_name USING gin (field);
PostgreSQL will raise an error:
ERROR: data type character varying 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.
How do I define a default operator method from the module?
Any help will be appreciated :-).