pg_isok
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_isok | 1.4.1 | UTIL | AGPL-3.0 | SQL |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 4340 | pg_isok | No | No | No | Yes | No | No | - |
superuser=false, but this is not a trusted extension.
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.4.1 | 1817161514 | pg_isok | - |
| RPM | PIGSTY | 1.4.1 | 1817161514 | pg_isok_$v | - |
| DEB | PIGSTY | 1.4.1 | 1817161514 | postgresql-$v-pg-isok | - |
Build
You can build the RPM / DEB packages for pg_isok using pig build:
pig build pkg pg_isok # build RPM / DEB packages
Install
You can install pg_isok directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
pig repo add pgsql -u # Add repo and update cache
Install the extension using pig or apt/yum/dnf:
pig install pg_isok; # Install for current active PG version
pig ext install -y pg_isok -v 18 # PG 18
pig ext install -y pg_isok -v 17 # PG 17
pig ext install -y pg_isok -v 16 # PG 16
pig ext install -y pg_isok -v 15 # PG 15
pig ext install -y pg_isok -v 14 # PG 14
dnf install -y pg_isok_18 # PG 18
dnf install -y pg_isok_17 # PG 17
dnf install -y pg_isok_16 # PG 16
dnf install -y pg_isok_15 # PG 15
dnf install -y pg_isok_14 # PG 14
apt install -y postgresql-18-pg-isok # PG 18
apt install -y postgresql-17-pg-isok # PG 17
apt install -y postgresql-16-pg-isok # PG 16
apt install -y postgresql-15-pg-isok # PG 15
apt install -y postgresql-14-pg-isok # PG 14
Create Extension:
CREATE EXTENSION pg_isok;
Usage
Sources: official repo, official docs home, official reference source
pg_isok is a query-based data integrity and monitoring extension. Instead of only reporting rows that currently look questionable, it stores prior results and focuses later runs on unresolved or undeferred changes.
CREATE SCHEMA isok;
CREATE EXTENSION pg_isok SCHEMA isok;
SELECT *
FROM isok.run_isok_queries()
AS problems;
Core Objects
ISOK_QUERIESstores the monitoring queries and their execution settings.ISOK_RESULTSstores the reported rows, including whether they were resolved or deferred.run_isok_queries()runs every active check.run_isok_queries($$VALUES ('check_name')$$)runs only selected checks.
Typical Workflow
Run one named check:
SELECT *
FROM isok.run_isok_queries($$VALUES ('new_countries')$$)
AS problems;
Accept or postpone a known warning by updating ISOK_RESULTS:
UPDATE isok.isok_results
SET deferred_to = 'infinity'
WHERE iqname = 'new_countries';
Use resolved when the condition is no longer a concern, or deferred_to when it should stay hidden until a later date.
Where It Fits
- data cleanup after imports
- monitoring unusual but sometimes acceptable patterns
- “soft trigger” style review workflows where hard constraints are too strict
Caveats
- Upstream recommends installing it in a dedicated schema and qualifying calls accordingly.
- The docs describe it as pure SQL, which is useful on managed PostgreSQL services where C extensions may be restricted.
- The package metadata in this repo says
superuser=false, but this is not documented upstream as a trusted extension; treat installation privileges conservatively.
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.