In PostgreSQL, what does pg_trgm (trigram) extension enable and which index type supports it?

Advanced SQL Developer Hard

Advanced SQL Developer — Hard

In PostgreSQL, what does pg_trgm (trigram) extension enable and which index type supports it?

Key points

  • pg_trgm enables fuzzy string matching and LIKE/ILIKE acceleration
  • GIN or GiST indexes are used on trigram decompositions of text
  • Trigrams help in comparing and matching similar strings efficiently
  • This extension is particularly useful for text search applications

Ready to go further?

Related questions