In PostgreSQL 9.3 Beta 2 (?), How do I create an index in a JSON field? I tried it with the -> operator used for hstore , but got the following error:
CREATE TABLE publishers(id INT, info JSON); CREATE INDEX ON publishers((info->'name'));
ERROR: json data type does not have a default operator class for the btree access method TIP. You must specify an operator class for the index or define a default operator class for the data type.
rlib Jul 23 '13 at 10:00 2013-07-23 10:00
source share