template_fdw
template_fdw · Foreign data wrapper for template tables that intentionally rejects SELECT and DML operations.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100568 | template_fdw | template_fdw | 0.0 | FDW | BSD-2-Clause | C |
PostgreSQL · 10, 11, 12, 13, 14, 15, 16, 17, 18
Usage
Sources:
template_fdw creates schema-only foreign tables that intentionally reject both reads and writes. They act as persistent templates for temporary tables, allowing tools such as plpgsql_check to resolve table shapes during static analysis without permitting accidental use of the persistent template relation.
The FDW is a development and validation guard, not remote storage. Any successful SELECT or DML against the foreign table contradicts its intended behavior and should fail a regression test. Control version 0.0 differs from upstream/PGXN release 0.0.2; identify builds by source commit and test error behavior after every PostgreSQL upgrade.
Keep templates in a dedicated schema, grant only the privileges needed by validation roles, and qualify persistent names explicitly so search-path changes do not target a real table unexpectedly.