is_jsonb_valid
is_jsonb_valid : Native JSONB validation against JSON Schema drafts 4 and 7
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 2765 | is_jsonb_valid | is_jsonb_valid | 0.1.4 |
FEAT | MIT | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-- | No | Yes | No | Yes | no | no |
| Relationships | |
|---|---|
| See Also | pg_jsonschema jsonschema postgres-json-schema jsquery |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.1.4 |
18 17 16 15 14 | is_jsonb_valid |
- |
| RPM | PIGSTY | 0.1.4 |
18 17 16 15 14 | is_jsonb_valid_$v |
- |
| DEB | PIGSTY | 0.1.4 |
18 17 16 15 14 | postgresql-$v-is-jsonb-valid |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 |
| el8.aarch64 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 |
| el9.x86_64 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 |
| el9.aarch64 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 |
| el10.x86_64 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 |
| el10.aarch64 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 |
| d12.x86_64 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 |
| d12.aarch64 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 |
| d13.x86_64 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 |
| d13.aarch64 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 |
| u22.x86_64 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 |
| u22.aarch64 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 |
| u24.x86_64 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 |
| u24.aarch64 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 |
| u26.x86_64 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 |
| u26.aarch64 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 | PIGSTY 0.1.4 |
Source
github.com/furstenheim/is_jsonb_valid
is_jsonb_valid-0.1.4-1f536758ae06.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
Sources:
- Official README at the catalog source revision
- Extension control file at the catalog source revision
- Version 0.1.4 extension SQL
- PGXN distribution page
is_jsonb_valid provides native boolean validation of JSONB values against JSON Schema Draft 4 or Draft 7. It is suitable for checks and predicates that need only pass/fail output; it does not return a path or diagnostic explaining a failed keyword.
Core Workflow
Choose the function that matches the schema draft and pass the schema first, followed by the value being validated.
The two functions are strict and immutable in version 0.1.4. This makes them usable in constraints and indexes when the schema is stable.
Draft Boundary and Limitations
The base validator follows Draft 4; the explicitly named alternative follows Draft 7. Select deliberately, because keyword meaning differs between drafts and the extension does not infer the draft from a schema declaration.
At the pinned revision, remote references are unsupported. Local references are limited to definitions reachable from the schema root, and identifier changes along a reference chain are not resolved. Format validation is also unsupported. These gaps mean a true result is only a claim about the implemented subset, not every behavior in the complete JSON Schema specifications.
No preload or restart is declared. Keep schema literals and application expectations under version control, and add representative valid and invalid cases whenever a constraint depends on this extension.