pg_living_assertions
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_living_assertions | 0.5.1 | ADMIN | PostgreSQL | SQL |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 5300 | pg_living_assertions | No | No | No | Yes | No | No | living_assertions |
| Related | |
|---|---|
| Depended By | pg_grammar_guard |
On-demand SQL checks run in a read-only subtransaction that is always rolled back; not per-write SQL ASSERTION constraints.
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.5.1 | 1817161514 | pg_living_assertions | - |
| RPM | PIGSTY | 0.5.1 | 1817161514 | pg_living_assertions_$v | - |
| DEB | PIGSTY | 0.5.1 | 1817161514 | postgresql-$v-pg-living-assertions | - |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 0.5.1 el8.x86_64.pg18 : pg_living_assertions_18 pg_living_assertions_18-0.5.1-1PGSTY.el8.noarch.rpm
| PIGSTY 0.5.1 el8.x86_64.pg17 : pg_living_assertions_17 pg_living_assertions_17-0.5.1-1PGSTY.el8.noarch.rpm
| PIGSTY 0.5.1 el8.x86_64.pg16 : pg_living_assertions_16 pg_living_assertions_16-0.5.1-1PGSTY.el8.noarch.rpm
| PIGSTY 0.5.1 el8.x86_64.pg15 : pg_living_assertions_15 pg_living_assertions_15-0.5.1-1PGSTY.el8.noarch.rpm
| PIGSTY 0.5.1 el8.x86_64.pg14 : pg_living_assertions_14 pg_living_assertions_14-0.5.1-1PGSTY.el8.noarch.rpm
|
| el8.aarch64 | PIGSTY 0.5.1 el8.aarch64.pg18 : pg_living_assertions_18 pg_living_assertions_18-0.5.1-1PGSTY.el8.noarch.rpm
| PIGSTY 0.5.1 el8.aarch64.pg17 : pg_living_assertions_17 pg_living_assertions_17-0.5.1-1PGSTY.el8.noarch.rpm
| PIGSTY 0.5.1 el8.aarch64.pg16 : pg_living_assertions_16 pg_living_assertions_16-0.5.1-1PGSTY.el8.noarch.rpm
| PIGSTY 0.5.1 el8.aarch64.pg15 : pg_living_assertions_15 pg_living_assertions_15-0.5.1-1PGSTY.el8.noarch.rpm
| PIGSTY 0.5.1 el8.aarch64.pg14 : pg_living_assertions_14 pg_living_assertions_14-0.5.1-1PGSTY.el8.noarch.rpm
|
| el9.x86_64 | PIGSTY 0.5.1 el9.x86_64.pg18 : pg_living_assertions_18 pg_living_assertions_18-0.5.1-1PGSTY.el9.noarch.rpm
| PIGSTY 0.5.1 el9.x86_64.pg17 : pg_living_assertions_17 pg_living_assertions_17-0.5.1-1PGSTY.el9.noarch.rpm
| PIGSTY 0.5.1 el9.x86_64.pg16 : pg_living_assertions_16 pg_living_assertions_16-0.5.1-1PGSTY.el9.noarch.rpm
| PIGSTY 0.5.1 el9.x86_64.pg15 : pg_living_assertions_15 pg_living_assertions_15-0.5.1-1PGSTY.el9.noarch.rpm
| PIGSTY 0.5.1 el9.x86_64.pg14 : pg_living_assertions_14 pg_living_assertions_14-0.5.1-1PGSTY.el9.noarch.rpm
|
| el9.aarch64 | PIGSTY 0.5.1 el9.aarch64.pg18 : pg_living_assertions_18 pg_living_assertions_18-0.5.1-1PGSTY.el9.noarch.rpm
| PIGSTY 0.5.1 el9.aarch64.pg17 : pg_living_assertions_17 pg_living_assertions_17-0.5.1-1PGSTY.el9.noarch.rpm
| PIGSTY 0.5.1 el9.aarch64.pg16 : pg_living_assertions_16 pg_living_assertions_16-0.5.1-1PGSTY.el9.noarch.rpm
| PIGSTY 0.5.1 el9.aarch64.pg15 : pg_living_assertions_15 pg_living_assertions_15-0.5.1-1PGSTY.el9.noarch.rpm
| PIGSTY 0.5.1 el9.aarch64.pg14 : pg_living_assertions_14 pg_living_assertions_14-0.5.1-1PGSTY.el9.noarch.rpm
|
| el10.x86_64 | PIGSTY 0.5.1 el10.x86_64.pg18 : pg_living_assertions_18 pg_living_assertions_18-0.5.1-1PGSTY.el10.noarch.rpm
| PIGSTY 0.5.1 el10.x86_64.pg17 : pg_living_assertions_17 pg_living_assertions_17-0.5.1-1PGSTY.el10.noarch.rpm
| PIGSTY 0.5.1 el10.x86_64.pg16 : pg_living_assertions_16 pg_living_assertions_16-0.5.1-1PGSTY.el10.noarch.rpm
| PIGSTY 0.5.1 el10.x86_64.pg15 : pg_living_assertions_15 pg_living_assertions_15-0.5.1-1PGSTY.el10.noarch.rpm
| PIGSTY 0.5.1 el10.x86_64.pg14 : pg_living_assertions_14 pg_living_assertions_14-0.5.1-1PGSTY.el10.noarch.rpm
|
| el10.aarch64 | PIGSTY 0.5.1 el10.aarch64.pg18 : pg_living_assertions_18 pg_living_assertions_18-0.5.1-1PGSTY.el10.noarch.rpm
| PIGSTY 0.5.1 el10.aarch64.pg17 : pg_living_assertions_17 pg_living_assertions_17-0.5.1-1PGSTY.el10.noarch.rpm
| PIGSTY 0.5.1 el10.aarch64.pg16 : pg_living_assertions_16 pg_living_assertions_16-0.5.1-1PGSTY.el10.noarch.rpm
| PIGSTY 0.5.1 el10.aarch64.pg15 : pg_living_assertions_15 pg_living_assertions_15-0.5.1-1PGSTY.el10.noarch.rpm
| PIGSTY 0.5.1 el10.aarch64.pg14 : pg_living_assertions_14 pg_living_assertions_14-0.5.1-1PGSTY.el10.noarch.rpm
|
| d12.x86_64 | PIGSTY 0.5.1 d12.x86_64.pg18 : postgresql-18-pg-living-assertions postgresql-18-pg-living-assertions_0.5.1-1PGSTY~bookworm_all.deb
| PIGSTY 0.5.1 d12.x86_64.pg17 : postgresql-17-pg-living-assertions postgresql-17-pg-living-assertions_0.5.1-1PGSTY~bookworm_all.deb
| PIGSTY 0.5.1 d12.x86_64.pg16 : postgresql-16-pg-living-assertions postgresql-16-pg-living-assertions_0.5.1-1PGSTY~bookworm_all.deb
| PIGSTY 0.5.1 d12.x86_64.pg15 : postgresql-15-pg-living-assertions postgresql-15-pg-living-assertions_0.5.1-1PGSTY~bookworm_all.deb
| PIGSTY 0.5.1 d12.x86_64.pg14 : postgresql-14-pg-living-assertions postgresql-14-pg-living-assertions_0.5.1-1PGSTY~bookworm_all.deb
|
| d12.aarch64 | PIGSTY 0.5.1 d12.aarch64.pg18 : postgresql-18-pg-living-assertions postgresql-18-pg-living-assertions_0.5.1-1PGSTY~bookworm_all.deb
| PIGSTY 0.5.1 d12.aarch64.pg17 : postgresql-17-pg-living-assertions postgresql-17-pg-living-assertions_0.5.1-1PGSTY~bookworm_all.deb
| PIGSTY 0.5.1 d12.aarch64.pg16 : postgresql-16-pg-living-assertions postgresql-16-pg-living-assertions_0.5.1-1PGSTY~bookworm_all.deb
| PIGSTY 0.5.1 d12.aarch64.pg15 : postgresql-15-pg-living-assertions postgresql-15-pg-living-assertions_0.5.1-1PGSTY~bookworm_all.deb
| PIGSTY 0.5.1 d12.aarch64.pg14 : postgresql-14-pg-living-assertions postgresql-14-pg-living-assertions_0.5.1-1PGSTY~bookworm_all.deb
|
| d13.x86_64 | PIGSTY 0.5.1 d13.x86_64.pg18 : postgresql-18-pg-living-assertions postgresql-18-pg-living-assertions_0.5.1-1PGSTY~trixie_all.deb
| PIGSTY 0.5.1 d13.x86_64.pg17 : postgresql-17-pg-living-assertions postgresql-17-pg-living-assertions_0.5.1-1PGSTY~trixie_all.deb
| PIGSTY 0.5.1 d13.x86_64.pg16 : postgresql-16-pg-living-assertions postgresql-16-pg-living-assertions_0.5.1-1PGSTY~trixie_all.deb
| PIGSTY 0.5.1 d13.x86_64.pg15 : postgresql-15-pg-living-assertions postgresql-15-pg-living-assertions_0.5.1-1PGSTY~trixie_all.deb
| PIGSTY 0.5.1 d13.x86_64.pg14 : postgresql-14-pg-living-assertions postgresql-14-pg-living-assertions_0.5.1-1PGSTY~trixie_all.deb
|
| d13.aarch64 | PIGSTY 0.5.1 d13.aarch64.pg18 : postgresql-18-pg-living-assertions postgresql-18-pg-living-assertions_0.5.1-1PGSTY~trixie_all.deb
| PIGSTY 0.5.1 d13.aarch64.pg17 : postgresql-17-pg-living-assertions postgresql-17-pg-living-assertions_0.5.1-1PGSTY~trixie_all.deb
| PIGSTY 0.5.1 d13.aarch64.pg16 : postgresql-16-pg-living-assertions postgresql-16-pg-living-assertions_0.5.1-1PGSTY~trixie_all.deb
| PIGSTY 0.5.1 d13.aarch64.pg15 : postgresql-15-pg-living-assertions postgresql-15-pg-living-assertions_0.5.1-1PGSTY~trixie_all.deb
| PIGSTY 0.5.1 d13.aarch64.pg14 : postgresql-14-pg-living-assertions postgresql-14-pg-living-assertions_0.5.1-1PGSTY~trixie_all.deb
|
| u22.x86_64 | PIGSTY 0.5.1 u22.x86_64.pg18 : postgresql-18-pg-living-assertions postgresql-18-pg-living-assertions_0.5.1-1PGSTY~jammy_all.deb
| PIGSTY 0.5.1 u22.x86_64.pg17 : postgresql-17-pg-living-assertions postgresql-17-pg-living-assertions_0.5.1-1PGSTY~jammy_all.deb
| PIGSTY 0.5.1 u22.x86_64.pg16 : postgresql-16-pg-living-assertions postgresql-16-pg-living-assertions_0.5.1-1PGSTY~jammy_all.deb
| PIGSTY 0.5.1 u22.x86_64.pg15 : postgresql-15-pg-living-assertions postgresql-15-pg-living-assertions_0.5.1-1PGSTY~jammy_all.deb
| PIGSTY 0.5.1 u22.x86_64.pg14 : postgresql-14-pg-living-assertions postgresql-14-pg-living-assertions_0.5.1-1PGSTY~jammy_all.deb
|
| u22.aarch64 | PIGSTY 0.5.1 u22.aarch64.pg18 : postgresql-18-pg-living-assertions postgresql-18-pg-living-assertions_0.5.1-1PGSTY~jammy_all.deb
| PIGSTY 0.5.1 u22.aarch64.pg17 : postgresql-17-pg-living-assertions postgresql-17-pg-living-assertions_0.5.1-1PGSTY~jammy_all.deb
| PIGSTY 0.5.1 u22.aarch64.pg16 : postgresql-16-pg-living-assertions postgresql-16-pg-living-assertions_0.5.1-1PGSTY~jammy_all.deb
| PIGSTY 0.5.1 u22.aarch64.pg15 : postgresql-15-pg-living-assertions postgresql-15-pg-living-assertions_0.5.1-1PGSTY~jammy_all.deb
| PIGSTY 0.5.1 u22.aarch64.pg14 : postgresql-14-pg-living-assertions postgresql-14-pg-living-assertions_0.5.1-1PGSTY~jammy_all.deb
|
| u24.x86_64 | PIGSTY 0.5.1 u24.x86_64.pg18 : postgresql-18-pg-living-assertions postgresql-18-pg-living-assertions_0.5.1-1PGSTY~noble_all.deb
| PIGSTY 0.5.1 u24.x86_64.pg17 : postgresql-17-pg-living-assertions postgresql-17-pg-living-assertions_0.5.1-1PGSTY~noble_all.deb
| PIGSTY 0.5.1 u24.x86_64.pg16 : postgresql-16-pg-living-assertions postgresql-16-pg-living-assertions_0.5.1-1PGSTY~noble_all.deb
| PIGSTY 0.5.1 u24.x86_64.pg15 : postgresql-15-pg-living-assertions postgresql-15-pg-living-assertions_0.5.1-1PGSTY~noble_all.deb
| PIGSTY 0.5.1 u24.x86_64.pg14 : postgresql-14-pg-living-assertions postgresql-14-pg-living-assertions_0.5.1-1PGSTY~noble_all.deb
|
| u24.aarch64 | PIGSTY 0.5.1 u24.aarch64.pg18 : postgresql-18-pg-living-assertions postgresql-18-pg-living-assertions_0.5.1-1PGSTY~noble_all.deb
| PIGSTY 0.5.1 u24.aarch64.pg17 : postgresql-17-pg-living-assertions postgresql-17-pg-living-assertions_0.5.1-1PGSTY~noble_all.deb
| PIGSTY 0.5.1 u24.aarch64.pg16 : postgresql-16-pg-living-assertions postgresql-16-pg-living-assertions_0.5.1-1PGSTY~noble_all.deb
| PIGSTY 0.5.1 u24.aarch64.pg15 : postgresql-15-pg-living-assertions postgresql-15-pg-living-assertions_0.5.1-1PGSTY~noble_all.deb
| PIGSTY 0.5.1 u24.aarch64.pg14 : postgresql-14-pg-living-assertions postgresql-14-pg-living-assertions_0.5.1-1PGSTY~noble_all.deb
|
| u26.x86_64 | PIGSTY 0.5.1 u26.x86_64.pg18 : postgresql-18-pg-living-assertions postgresql-18-pg-living-assertions_0.5.1-1PGSTY~resolute_all.deb
| PIGSTY 0.5.1 u26.x86_64.pg17 : postgresql-17-pg-living-assertions postgresql-17-pg-living-assertions_0.5.1-1PGSTY~resolute_all.deb
| PIGSTY 0.5.1 u26.x86_64.pg16 : postgresql-16-pg-living-assertions postgresql-16-pg-living-assertions_0.5.1-1PGSTY~resolute_all.deb
| PIGSTY 0.5.1 u26.x86_64.pg15 : postgresql-15-pg-living-assertions postgresql-15-pg-living-assertions_0.5.1-1PGSTY~resolute_all.deb
| PIGSTY 0.5.1 u26.x86_64.pg14 : postgresql-14-pg-living-assertions postgresql-14-pg-living-assertions_0.5.1-1PGSTY~resolute_all.deb
|
| u26.aarch64 | PIGSTY 0.5.1 u26.aarch64.pg18 : postgresql-18-pg-living-assertions postgresql-18-pg-living-assertions_0.5.1-1PGSTY~resolute_all.deb
| PIGSTY 0.5.1 u26.aarch64.pg17 : postgresql-17-pg-living-assertions postgresql-17-pg-living-assertions_0.5.1-1PGSTY~resolute_all.deb
| PIGSTY 0.5.1 u26.aarch64.pg16 : postgresql-16-pg-living-assertions postgresql-16-pg-living-assertions_0.5.1-1PGSTY~resolute_all.deb
| PIGSTY 0.5.1 u26.aarch64.pg15 : postgresql-15-pg-living-assertions postgresql-15-pg-living-assertions_0.5.1-1PGSTY~resolute_all.deb
| PIGSTY 0.5.1 u26.aarch64.pg14 : postgresql-14-pg-living-assertions postgresql-14-pg-living-assertions_0.5.1-1PGSTY~resolute_all.deb
|
Build
You can build the RPM / DEB packages for pg_living_assertions using pig build:
Install
You can install pg_living_assertions directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Create Extension:
Usage
Sources:
- README.md
- pg_living_assertions.control
- pg_living_assertions–0.4.1–0.5.0.sql
- pg_living_assertions–0.5.0–0.5.1.sql
- test/sql/read_only.sql
pg_living_assertions 0.5.1 stores SQL checks, verdicts, verification times and replacement history. These are checks run on demand, not SQL ASSERTION constraints evaluated on every write. It is a pure SQL extension with no preload requirement.
Register and Verify
Results and History
A check must return exactly one row with boolean holds and optional text detail. living_assertions.run_all() evaluates registered checks. living_assertions.state() distinguishes holds, broken, unknown, erroring, unchecked, retired and unregistered; living_assertions.stale() separates never-checked assertions from old results. living_assertions.declare_unchanged() records an expression for later text comparison, so the author must canonicalize its output. Definitions are superseded with a reason; results and registry data are included in database dumps.
Execution and Privileges
Since 0.5.0 the evaluator runs read-only inside a subtransaction that is always rolled back, preserving its verdict. This repairs the older STABLE-only evaluator, which did not stop side effects through volatile functions. It is not a sandbox for untrusted SQL: temporary-sequence changes, session advisory locks and external effects can survive. Only trusted administrators should register checks; they execute with the privileges of the later caller. Registry tables belong to the extension owner and write functions are revoked from PUBLIC by default.
Upgrade
After installing the matching files, use ALTER EXTENSION pg_living_assertions UPDATE TO '0.5.1'. The 0.4.1→0.5.0→0.5.1 chain replaces evaluator functions without changing registry tables. The final patch qualifies row types in run() so type-cache invalidation does not resolve them under an assertion’s unrelated search path.
Fresh installation also uses an earlier base SQL script followed by the packaged upgrade chain; keep the complete set of matching scripts installed.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)