News for hackers. Stuff that matters.
Re:Mongo but on Postgres and with strong consistency benefits by evanelias on Monday July 08, 2024 @03:53PM (#40908901)
I'd assume this might be solvable in the DB layer using CHECK constraints, possibly combined with JSON Schema validation?

From quick glance, JSON Schema validation isn't built-in to Postgres, but there are third-party extensions, such as https://github.com/supabase/pg_jsonschema or https://github.com/gavinwahl/postgres-json-schema.

I'm more familiar with MySQL and MariaDB, which offer it built-in: https://dev.mysql.com/doc/refman/8.0/en/json-validation-func... and https://mariadb.com/kb/en/json_schema_valid/

There are no comments on this comment yet.