jsonb is great for flexibility, but a nightmare for data integrity. Andrew Dunstan built json_schema_validate, a C extension that brings JSON Schema Draft 7 directly into your CHECK constraints.
The kicker? It’s up to 70x faster than existing Rust-based tools: https://www.enterprisedb.com/blog/validating-shape-your-json-data #PostgreSQL
