我想使用 JSON 类型而不是表。例如: CREATE TABLE xds ( id serial NOT NULL PRIMARY KEY, info json NOT NULL ); INSERT INTO xds (info) VALUES('{ "customer": "Lily Bosch", "type": ["sales","marketing","office"]}'), ('{ "customer": "Josh William ","type": ["sales", "office"]}'), ('{ "customer": "Mary Clark", "type": ["management","startup"]}'); 但我想验证“type”,它的值应该来自其他表。我可以在触发器(I,U)中进行验证,但该怎么做?
主页
/
user-566745