Skip to content

Release v0.4.0

Latest

Choose a tag to compare

@github-actions github-actions released this 03 Jul 18:11
v0.4.0

⚡ Improvements

  • Added re2_version(), which returns the full semantic version. This is the same value visible in pg_get_loaded_modules(), but available in Postgres versions prior to 18, and without having to load re2 first.
  • Added Index support, avoiding table scans for patterns that can use an index:
    • A pattern starting with ^ and a fixed prefix, such as WHERE re2match(col, '^order_2025'), now reads the matching range of an existing b-tree index. See Index Support.
    • Added @~ match operator (same as re2match) and gin_re2_ops operator class. CREATE INDEX ... USING gin (col gin_re2_ops) lets WHERE col @~ pattern only visit rows containing required trigrams.
    • Row-count estimates for re2match and @~ now come from testing patterns against column statistics for patterns containing a constant pattern. In such cases this improves cost estimation over the default fixed guess, allowing the planner to pick better plans.

📔 Notes

  • Run ALTER EXTENSION re2 UPDATE TO '0.4' to expose the new operator and operator class on existing databases.

🆚 For more detail compare changes since v0.3.0.