Help setting up pg_trgm


#1

Can someone provide steps for setting up pg_trgm?

I tried CREATE EXTENSION pg_trgm; but it returns the following error:

ERROR: could not open extension control file “/usr/share/postgresql/9.3/extension/pg_trgm.control”: No such file or directory


#2

Courtesy of this stack exchange post:

Trigram is an extension, so:

CREATE EXTENSION pg_trgm;

Note that if this does not work and you get an error “ERROR: could not open extension control file “/usr/share/postgresql/9.3/extension/pg_trgm.control”: No such file or directory” then you can run sudo apt install postgresql-contrib

Hopefully that helps!


#3

Thank you, running postgresql-contrib worked.