pg_living_assertions
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_living_assertions | 0.5.10 | ADMIN | Apache-2.0 | 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.10 | 1817161514 | pg_living_assertions | - |
| RPM | PIGSTY | 0.5.10 | 1817161514 | pg_living_assertions_$v | - |
| DEB | PIGSTY | 0.5.10 | 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:
pg_living_assertions 0.5.10 stores named SQL assertions, results and replacement history. Checks run on demand; they are not constraints evaluated on every write. This pure SQL extension needs no preload.
Core Workflow
Operational Boundaries
A check returns one boolean holds and optional text detail. living_assertions.run_all() evaluates the registry; living_assertions.state(), living_assertions.status and living_assertions.stale() distinguish failures, unknown/erroring results and stale or absent checks. living_assertions.declare_unchanged() fingerprints a canonicalized expression; a value disappearing to NULL is broken. Checks run as their recorded author in a read-only, rolled-back subtransaction with the author search path and temporary schemas last. The caller must be allowed to SET ROLE to that author. Session advisory locks acquired during evaluation are released, but external effects and temporary-sequence changes are not a sandboxed resource. Only trusted authors should register SQL. Registration and checks are server-dated, tables reject TRUNCATE, and retirement/replacement is restricted to the author or an authorized role. Upgrade through the complete matching SQL chain; old assertions retain their existing fingerprint algorithm. Current releases use Apache-2.0; releases through 0.5.3 retain their original PostgreSQL License.
Role Isolation in 0.5.10
Version 0.5.10 evaluates a check in a temporary SECURITY DEFINER function owned by its recorded author when role isolation is needed. PostgreSQL then refuses attempts to reset the role or session authorization inside that frame; the frame is created and rolled back with the read-only check. The author needs TEMP on the database when a frame is required, and the caller still needs authority to act as that author. A SECURITY DEFINER caller can now run another author’s checks under that authority. This closes the role-reset escape in 0.5.8/0.5.9; it does not make external effects safe.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)