table_guard
Configurable protection against DROP, TRUNCATE, and unqualified whole-table DELETE.
pg_table_guard · Configurable protection against DROP, TRUNCATE, and unqualified whole-table DELETE.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101960 | table_guard | pg_table_guard | 1.0 | SEC | C |
PostgreSQL · 14, 15, 16, 17, 18
Usage
Sources:
table_guard Configurable protection against DROP, TRUNCATE, and unqualified whole-table DELETE.
Enablement
Merge table_guard into the existing preload list, restart PostgreSQL, and then create table_guard in each database that needs its SQL objects:
Core Workflow
The following example is taken from the reviewed upstream documentation. Adapt object names, paths, credentials, and workload values before use.
Main Objects
The reviewed install surface includes these prominent objects:
| Object | Kind | Operational role |
|---|---|---|
table_guard_help | FUNCTION | Callable function from the reviewed install surface. |
table_guard_settings | VIEW | Inspection or query view created by the extension. |
table_guard_version | FUNCTION | Callable function from the reviewed install surface. |
Operations and Boundaries
- The verified PostgreSQL-major evidence covers 14, 15, 16, 17, 18; do not infer unlisted majors.
- Preloading
table_guardchanges cluster startup state; stage configuration and restart changes separately fromCREATE EXTENSION.