select * from each('aaa=>bq, b=>NULL, ""=>1 ');
--- @>
-select 'a=>b, b=>1, c=>NULL'::hstore @> 'a=>b';
-select 'a=>b, b=>1, c=>NULL'::hstore @> 'a=>b, c=>NULL';
-select 'a=>b, b=>1, c=>NULL'::hstore @> 'a=>b, g=>NULL';
-select 'a=>b, b=>1, c=>NULL'::hstore @> 'g=>NULL';
-select 'a=>b, b=>1, c=>NULL'::hstore @> 'a=>c';
-select 'a=>b, b=>1, c=>NULL'::hstore @> 'a=>b';
-select 'a=>b, b=>1, c=>NULL'::hstore @> 'a=>b, c=>q';
-
-- json
select hstore_to_json('"a key" =>1, b => t, c => null, d=> 12345, e => 012345, f=> 1.234, g=> 2.345e+4');
select cast( hstore '"a key" =>1, b => t, c => null, d=> 12345, e => 012345, f=> 1.234, g=> 2.345e+4' as json);
[{"a": 1},{"b": [2, 3]}]
(1 row)
+-- operators
+-- @>
+select '{"a":"b", "b":1, "c":null}'::jsonb @> '{"a":"b"}';
+ ?column?
+----------
+ t
+(1 row)
+
+select '{"a":"b", "b":1, "c":null}'::jsonb @> '{"a":"b", "c":null}';
+ ?column?
+----------
+ t
+(1 row)
+
+select '{"a":"b", "b":1, "c":null}'::jsonb @> '{"a":"b", "g":null}';
+ ?column?
+----------
+ f
+(1 row)
+
+select '{"a":"b", "b":1, "c":null}'::jsonb @> '{"g":null}';
+ ?column?
+----------
+ f
+(1 row)
+
+select '{"a":"b", "b":1, "c":null}'::jsonb @> '{"a":"c"}';
+ ?column?
+----------
+ f
+(1 row)
+
+select '{"a":"b", "b":1, "c":null}'::jsonb @> '{"a":"b"}';
+ ?column?
+----------
+ t
+(1 row)
+
+select '{"a":"b", "b":1, "c":null}'::jsonb @> '{"a":"b", "c":"q"}';
+ ?column?
+----------
+ f
+(1 row)
+
-- jsonb extraction functions
CREATE TEMP TABLE test_jsonb (
json_type text,
-- make sure jsonb is passed through json generators without being escaped
select array_to_json(ARRAY [jsonb '{"a":1}', jsonb '{"b":[2,3]}']);
+-- operators
+
+-- @>
+select '{"a":"b", "b":1, "c":null}'::jsonb @> '{"a":"b"}';
+select '{"a":"b", "b":1, "c":null}'::jsonb @> '{"a":"b", "c":null}';
+select '{"a":"b", "b":1, "c":null}'::jsonb @> '{"a":"b", "g":null}';
+select '{"a":"b", "b":1, "c":null}'::jsonb @> '{"g":null}';
+select '{"a":"b", "b":1, "c":null}'::jsonb @> '{"a":"c"}';
+select '{"a":"b", "b":1, "c":null}'::jsonb @> '{"a":"b"}';
+select '{"a":"b", "b":1, "c":null}'::jsonb @> '{"a":"b", "c":"q"}';
-- jsonb extraction functions