X-Git-Url: https://git.8kb.co.uk/?p=postgresql%2Fpg_jsonb_opx;a=blobdiff_plain;f=sql%2Fjsonb_opx.sql;fp=sql%2Fjsonb_opx.sql;h=c89f5c54f2101df56f67b0468f46ddd78619a3a0;hp=d1e9ab3230959291f86a7e660a76734f44372d85;hb=e2015cbcbef47fbc6969498364bbcdd97321acc8;hpb=dca8f53c568c77ea611007f3dc5745c2e7c8e433 diff --git a/sql/jsonb_opx.sql b/sql/jsonb_opx.sql index d1e9ab3..c89f5c5 100755 --- a/sql/jsonb_opx.sql +++ b/sql/jsonb_opx.sql @@ -40,14 +40,14 @@ SELECT '{"a": 1, "b": 2, "c": 3}'::jsonb - '{"a": 4, "b": 2}'::jsonb; -- jsonb deletion from an array should only match on key SELECT '["a", "b", "c"]'::jsonb - '{"a": 4, "b": 2}'::jsonb; --- jsonb deletion from nested objectys should not be part matched -SELECT '{"a": 4, "b": 2, "c": 3, "d": {"a": 4}}'::jsonb - '{"a": 4, "b": 2}'::jsonb +-- jsonb deletion from nested objects should not be part matched +SELECT '{"a": 4, "b": 2, "c": 3, "d": {"a": 4}}'::jsonb - '{"a": 4, "b": 2}'::jsonb; -- but a match of all nested values should narcg -SELECT '{"a": 4, "b": 2, "c": 3, "d": {"a": 4}}'::jsonb - '{"d": {"a": 4}, "b": 2}'::jsonb +SELECT '{"a": 4, "b": 2, "c": 3, "d": {"a": 4}}'::jsonb - '{"d": {"a": 4}, "b": 2}'::jsonb; -- others -SELECT '{"a": 4, "b": 2, "c": 3, "d": {"a": false}}'::jsonb - '{"d": {"a": false}, "b": 2}'::jsonb +SELECT '{"a": 4, "b": 2, "c": 3, "d": {"a": false}}'::jsonb - '{"d": {"a": false}, "b": 2}'::jsonb; ------------------------------------------------------------------------------- -- Tests for jsonb || jsonb