/plushcap/analysis/supabase/supabase-pg-jsonschema-a-postgres-extension-for-json-validation

pg_jsonschema: JSON Schema support for Postgres

What's this blog post about?

Today, Supabase released pg_jsonschema, a Postgres extension that adds JSON Schema validation support for json and jsonb data types. This extension allows developers to enforce constraints on document data types in SQL databases, similar to those applied by relational databases. The extension offers two functions: json_matches_schema() and jsonb_matches_schema(), which can validate a json or jsonb instance against a JSON Schema. By using these functions in combination with check constraints, developers can ensure that their data models are well-specified while still taking advantage of the flexibility offered by document data types.

Company
Supabase

Date published
Aug. 19, 2022

Author(s)
Oliver Rice

Word count
763

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.