(
SELECT ('{' || string_agg(to_json(key) || ':' || value, ',') || '}')
FROM jsonb_each(a)
- WHERE NOT ('{"' || key || '":' || value || '}')::jsonb ? b
+ WHERE NOT ('{' || to_json(key) || ':' || value || '}')::jsonb ? b
)
, '{}')::jsonb;
$BODY$
(
SELECT ('{' || string_agg(to_json(key) || ':' || value, ',') || '}')
FROM jsonb_each(a)
- WHERE NOT ('{"' || key || '":' || value || '}')::jsonb ?| b
+ WHERE NOT ('{' || to_json(key) || ':' || value || '}')::jsonb ?| b
)
, '{}')::jsonb;
$BODY$
(
SELECT ('{' || string_agg(to_json(key) || ':' || value, ',') || '}')
FROM jsonb_each(a)
- WHERE NOT ('{"' || key || '":' || value || '}')::jsonb <@ b
+ WHERE NOT ('{' || to_json(key) || ':' || value || '}')::jsonb <@ b
)
, '{}')::jsonb;
$BODY$