From e2015cbcbef47fbc6969498364bbcdd97321acc8 Mon Sep 17 00:00:00 2001 From: glyn Date: Mon, 16 Feb 2015 18:38:38 +0000 Subject: [PATCH] Ammend missing semicolons in regression tests --- expected/jsonb_opx.out | 31 ++++++++++++++++++++++++------- sql/jsonb_opx.sql | 8 ++++---- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/expected/jsonb_opx.out b/expected/jsonb_opx.out index add2f69..b79bde9 100755 --- a/expected/jsonb_opx.out +++ b/expected/jsonb_opx.out @@ -117,20 +117,37 @@ SELECT '["a", "b", "c"]'::jsonb - '{"a": 4, "b": 2}'::jsonb; ["c"] (1 row) --- 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; + ?column? +------------------------- + {"c": 3, "d": {"a": 4}} +(1 row) + -- 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; + ?column? +------------------ + {"a": 4, "c": 3} +(1 row) + -- 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; + ?column? +------------------ + {"a": 4, "c": 3} +(1 row) + ------------------------------------------------------------------------------- -- Tests for jsonb || jsonb ------------------------------------------------------------------------------- -- duplicates should automatically be removed by lower level logic SELECT '{"a": 1, "b": 2, "c": 3}'::jsonb || '{"a": 4, "b": 2, "d": 4}'::jsonb; -ERROR: syntax error at or near "SELECT" -LINE 3: SELECT '{"a": 4, "b": 2, "c": 3, "d": {"a": 4}}'::jsonb - '{... - ^ + ?column? +---------------------------------- + {"a": 4, "b": 2, "c": 3, "d": 4} +(1 row) + -- concatentation of arrays SELECT '["a", "b"]'::jsonb || '["c"]'::jsonb; ?column? 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 -- 2.39.2