Unfortunately, there is no easy way to make direct equality tags jsonin 9.3.
9.3 jsontype does not have an equality operator since it accepts json with duplicate keys (many implementations are expected). It is unclear if {"a":1, "a":2}"equal" {"a":1}or not.
9.4 jsonb, , .
regress=
ERROR: operator does not exist: json = json
LINE 1: SELECT '{"a":1, "a":2}'::json = '{"a":1}'::json;
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
regress=
?column?
----------
f
(1 row)
, , , , 9.3.
json - , , {"a":1, "b":2} {"b":2, "a":1} .
PL/V8 JavaScript jon JavaScript .
json, b-tree opclass, . SQL - . CREATE OPERATOR CREATE OPERATOR CLASS.
, GROUP BY json 9.3.
9.4 beta1 jsonb.