Quick Tip: Fixing Postgres operator class "gin_trgm_ops" does not exist for access method "gin"

2015-06-17 15:33:27 -0400

This error can show up when you are trying to load a schema into a new database in Postgres that has been dumped from a database with the pg_trgm extension. You can fix it by adding the extension to the template database (template1) so that when you create a new database, it is already there, ready to go.

To do this, run this at the command line:

psql -d template1 -c 'create extension pg_trgm;'