Alle operators in PostgreSQL gebruiken de onderliggende procedure:
> SELECT oprname, oprcode FROM pg_operator WHERE oprname LIKE '%?%'
oprname | oprcode
--------------------------
? | jsonb_exists
?| | jsonb_exists_any
?& | jsonb_exists_all
...
U kunt uw zoekopdracht dus herschrijven met jsonb_exists(jsonb, text)
zoals dit:
SELECT t.id
FROM task AS t
WHERE jsonb_exists(t.worker_ids, :workerId)
ORDER BY t.created_at