Skip to content
Advertisement

How to use % operator from the extension pg_trgm?

I have my pg_trgm module installed.

The schema set is extensions. To use it I have to run something like this select:

I’m trying to run a statement using the % operator and got the following message.

What is necessary to run % or <-> operators?

Advertisement

Answer

Most probably the problem is with the search_path setting. Run:

Is the schema where you installed pg_trgm included? If not, include it.

Or, if you have the necessary privileges, you can change the schema of an extension with:

Alternatively, you can schema-qualify functions – and even operators using the OPERATOR() construct:

Removes dependency on the search_path. But it’s tedious.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement