18 ms·
can you do a normal index on JSON though? I guess you can with the function based indexes. 9.3 actually makes JSON meaningful in Postgres since you can actually
by gregwebs 13y ago
can you do a normal index on JSON though? I guess you can with the function based indexes. 9.3 actually makes JSON meaningful in Postgres since you can actually query it now.
But there are no write operations, so MongoDB is still a ton nicer here with its atomic modifiers like $push.
- masklinn 13y ago> can you do a normal index on JSON though? Yes, using the ->> operator you should be able to create an index on a JSON field, e.g. CREATE INDEX ON table ((field->>'thing')) (an index on a JSON column makes no more sense than on e.g. an hstore column)