I have tried to look for this online and I simply cannot find anything.
I have a column in a PostgreSQL database of the JSON type. I also have a table in the database that signifies valid key names can be used in that JSON object.
An example is if I wanted to JSON to look like: { "key":"value", "key2":"value" }, key and key2 would have to be entries in the valid keys table in order for this to be inserted, otherwise it would break the constraint. I am using these in a C# project so I could probably do the checking in the code which I will also do, but I also want to stop someone from just creating a row via pgAdmin.
Any ideas?