In PostgreSQL 9.3 Beta 2 (?), Come posso creare un indice su un campo JSON? Ho provato utilizzando l'operatore ->
utilizzato per hstore
ma ho ottenuto il seguente errore:Come creare l'indice sul campo json in Postgres 9.3
CREATE TABLE publishers(id INT, info JSON);
CREATE INDEX ON publishers((info->'name'));
ERROR: data type json has no default operator class for access method "btree" HINT: You must specify an operator class for the index or define a default operator class for the data type.
- Nel titolo – rlib
In futuro si prega di dare un'occhiata a http://stackoverflow.com/tags/postgresql/info, la sezione "porre domande migliori"; potrebbe aiutare a ottenere risposte migliori prima con meno domande fastidiose. –