pg_wildcard
pg_wildcard · Wildcard and regex telemetry search with an Antalya foreign data wrapper
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 102431 | pg_wildcard | pg_wildcard | 0.2.3 | FTS | Apache-2.0 | Rust |
PostgreSQL · 18, 19
Usage
Sources:
- 0.2.3
- pg_wildcard/README.md
- pg_wildcard/pg_wildcard.control
- pg_wildcard/Cargo.toml
- docs/sql-api.md
- docs/fdw.md
- docs/operations.md
- pg_wildcard/sql/pg_wildcard–0.2.2–0.2.3.sql
pg_wildcard 0.2.3 searches telemetry strings with wildcard and regular-expression predicates, derives indicators and generates ClickHouse/Antalya queries. It also supplies the scan-only wildcard_fdw. The published crate uses antalya-rs 0.1.1; PostgreSQL 18 and 19 are qualified server majors. Declared PostgreSQL 14–17 build features require separate qualification.
Local String Search
A superuser installs this untrusted, non-relocatable extension. No shared preload or server restart is documented for ordinary use.
Views include raw, lower, decoded, revdomain and winpath. wc_match, wc_like and wc_regex match text; wc_regex_bytes handles bytes. wc_url_decode preserves decoded bytes, while wc_view produces display text. wc_explain describes conservative candidates; an exact predicate must still decide the match. Regex semantics follow the supported RE2 dialect.
Remote Queries and Lake Metadata
wc_ch_predicate and related helpers return SQL for the caller to execute. Their optional filter expressions are trusted SQL fragments. wc_lake_index, wc_lake_file and wc_lake_gram hold imported pruning metadata; candidate files always require an exact recheck, and missing coverage must widen the scan.
wildcard_fdw requires an Antalya endpoint, a user mapping with bearer_token, compatible scalar columns and a UTF-8 PostgreSQL database. Generic ClickHouse HTTP availability is insufficient. The mapping principal needs source access and the documented query-completion evidence, normally from system.query_log. Protect mapping credentials and refresh tokens separately.
The wrapper pushes supported predicates but retains local checks. Joins and aggregates stay local; foreign tables have no local PostgreSQL index. Unsupported collation or query shapes limit pushdown. A late remote or completion error fails the statement even after some rows have been streamed.
Resource Limits and Upgrades
pg_wildcard.matcher_cache_entries and pg_wildcard.matcher_cache_kb bound retained patterns per backend; wc_matcher_cache_stats() reports this cache. These limits do not cap total backend memory.
From 0.2.0, 0.2.1 or 0.2.2, install the matching 0.2.3 library and SQL files, reconnect, then run:
The update preserves SQL signatures and records the new extension version. Standalone library, lake CLI and remote-engine configuration are separate components.
Optional batching and staged sweeps run outside the FDW; callers own execution, admission limits and cleanup. The FDW does not automatically parallelize queries, and compression is not exposed as a production FDW option.