pg_trgm
A contrib module for determining the similarity of text based on trigram matching
pg_trgm
is a contrib module providing functions and operators for determining the similarity of alphanumeric text based on trigram matching, and index operator classes for fast string searching.
pg_trgm
was added in PostgreSQL 8.0.
Change history
- PostgreSQL 14
- PostgreSQL 13
- marked as a
trusted extension
(commit eb67623c)
- marked as a
- PostgreSQL 11 (extension version 1.4)
- function
strict_word_similarity()
added (commit be8a7a68)
- function
- PostgreSQL 9.6 (extension version 1.3)
- function cleanup and parallel query support (commit 749a787c)
- PostgreSQL 9.6 (extension version 1.2)
- PostgreSQL 9.4
- improved heuristics for regular expression index searches (commit 80a5cf64)
- PostgreSQL 9.3 (extension version 1.1)
- support indexing of regular-expression searches (commit 3ccae48f)
- PostgreSQL 9.1 (extension version 1.0)
- PostgreSQL 8.4
- support for multibyte encoding added (commit b87b52bf)
- PostgreSQL 8.3
- PostgreSQL 8.0
- added (commit cbfa4092)
Note: some modifications prior to PostgreSQL 9.1 may not be recorded here.
References
- PostgreSQL documentation: pg_trgm
Useful links
- Postgres text search: balancing query time and relevancy - October 2021 blog article by Stephen Gutekanst / Sourcegraph
- Fuzzy string matching with Trigram and Trigraphs - undated article from Postgres OnLine Journal
Categories
See also
pg_bigm, PGroonga