Merge pull request #2 from schinckel/patch-2 master
authorGlyn Astill <glynastill@yahoo.co.uk>
Sat, 24 Jan 2015 08:10:56 +0000 (08:10 +0000)
committerGlyn Astill <glynastill@yahoo.co.uk>
Sat, 24 Jan 2015 08:10:56 +0000 (08:10 +0000)
Use array ALL() function, and remove json/jsonb casts

pg_jsonb_delete_op.sql

index 5671a35..d7e3455 100755 (executable)
@@ -12,7 +12,7 @@ $BODY$
         (
             SELECT ('{' || string_agg(to_json(key) || ':' || value, ',') || '}')
             FROM jsonb_each(a)
-            WHERE NOT to_json(key)::jsonb ? b
+            WHERE key <> b
         )
     , '{}')::jsonb;
 $BODY$