我有这张桌子:
Directives Table:
user_id: 5
account_id: 1
filters: { "a": "my value", "names": ['myname', 'yourname'] } // jsonb
我想通过判断
Directives
是否为 filters->name
元素的集合(数组?)来过滤 IN
表中的行:
即:
SELECT * FROM directives
WHERE filters->names IN ['yourname']
谢谢你。