pglens
pglens · Maintain view-derived projection tables through an experimental manual per-key recompute API
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101224 | pglens | pglens | 0.1.0 | FEAT | Apache-2.0 | C |
PostgreSQL · 15
Usage
Sources:
- Upstream README and current-status statement
- Extension control file
- SQL API
- Recompute implementation
- Roadmap
pglens is an experimental projection/read-model extension. A lens ties a plain SQL view to a physical target table and a stable key. Registration copies the view’s current shape into an empty table with a primary key; explicit recomputation selects one key from the view and upserts or deletes the corresponding target row.
Register and recompute a lens
Despite the intended asynchronous architecture, version 0.1.0 does not implement WAL decoding, committed-change capture, affected-key discovery, a background worker, checkpointing, retry, or restart recovery. Recompute is manual.
Only plain views are supported; the key must identify at most one projection row; the target shape is fixed at registration; later view changes are not propagated; and negative-path coverage is limited. Upstream explicitly marks the project experimental and unsuitable for production. Treat it as a design prototype until consistency, crash recovery, privilege boundaries, schema migration, and operational observability are implemented and tested.