
PostgreSQL中的所有运算符都使用基础过程:
> SELECt oprname, oprpre FROM pg_operator WHERe oprname LIKE '%?%'oprname | oprpre--------------------------? | jsonb_exists?| | jsonb_exists_any?& | jsonb_exists_all...
因此,您可以使用以下方式重写查询
jsonb_exists(jsonb, text):
SELECt t.idFROM task AS tWHERe jsonb_exists(t.worker_ids, :workerId)ORDER BY t.created_at