pg_tre 1.1.1 is a new PostgreSQL 18+ extension that adds a native index access method for approximate-regex (fuzzy) matching using Levenshtein edit-distance semantics. It uses a three-tier filter funnel (BRIN-style range bloom, trigram postings, per-tuple bloom) backed by the TRE library, enabling indexed queries like 'find text within k edits of this regex pattern'. Key features include UTF-8/CJK trigram support, DoS protection via configurable caps, WAL coverage, VACUUM awareness, and REINDEX CONCURRENTLY support. It complements rather than replaces pg_trgm, tsvector/tsquery, and pgvector, filling the gap for typo-tolerant log search, SKU lookups, and hybrid RAG pipelines where exact regex or semantic search fall short.

4m read timeFrom postgresql.org
Post cover image
Table of contents
HighlightsHow pg_tre fits alongside what you already haveA few things only pg_tre does wellInstallationA note on stability and feedbackLinks

Sort: