alohadb_jsonschema
alohadb · AlohaDB JSON Schema validation and named schema registry
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 102034 | alohadb_jsonschema | alohadb | 1.0 | TYPE | MIT | C |
Usage
Sources:
- Official alohadb_jsonschema.control
- Official alohadb_jsonschema–1.0.sql
- Official jsonschema_validator.c
alohadb_jsonschema 1.0 validates JSONB documents against a subset of JSON Schema Draft-07 and offers an optional named-schema registry. These sources belong to the AlohaDB kernel; stock PostgreSQL compatibility is not established.
Validate Documents
Objects and Constraints
jsonschema_is_valid() returns a boolean and is immutable, strict and parallel-safe, suitable for a CHECK with a fixed schema. jsonschema_validate() returns validity plus error path and message. alohadb_jsonschema_registry stores names, JSONB schemas and creation times. Named validation is stable rather than immutable because it reads this registry. Control registry writes through database privileges; changing a registered schema does not automatically revalidate stored application data.
Support Boundary
Supported checks include types, properties, required fields, numeric/string/array/object bounds, pattern, enum, const and logical schema composition. $ref resolves internal JSON pointers only. Do not assume remote references or every Draft-07 keyword is implemented. Installation requires administrator privileges; the control marks the extension non-relocatable and not trusted. No shared-preload requirement is present in this module.