Skip to content

Glossary: PostgreSQL Beyond the Basics

pg_trgm, trigram

Also written: pg_trgm, trigram, trigrams, similarity()

A trigram is a group of three characters in a row. The pg_trgm extension splits text into trigrams so a GIN index can speed up `ILIKE '%word%'` and find similar spellings with `similarity()` or `%`.

Where the book teaches it

Related terms

GINExtension