You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Or, the first part fixed to emit a proper JSON array. This query works as expected:
select * from events where (data @> '{ "players": ["Matt","Melinda"] }' OR EXISTS (SELECT * FROM jsonb_array_elements(data->'players') WHERE jsonb_typeof(data->'players')='array' AND value @> '["Matt","Melinda"]'::jsonb))
Expected: data @> '{ "players": ["Matt","Melinda"] }'
Actual: data @> '{ "players": Matt,Melinda }'
I have table with a 'data' JSONB column that has an object like this:
Instead of using
$in
, I am using a query like this:The resulting SQL looks like this:
Postgres throws an error:
the first part of the SQL should be omitted because it's an array select, which is covered by the EXISTS... statement.
The text was updated successfully, but these errors were encountered: