JSON type gives you some typed values within the doc, multi-level nesting, etc. You can add functional indexes (http://www.postgresql.org/docs/9.1/static/indexes-expression...) to index specific attributes within the JSON, do legit sorts over values, reasonable array queries, etc. It seems much, much closer to what Mongo does than anything you can do with hstore.
Comments
There is a JSON type but it just validates content.
HSTORE can be fully indexed (gIST and GIN). Just have to roll your own object graphs for nesting if that's what you need to do.
I swear I have typed this exact same comment previously. Deja vu, maybe
JSON type gives you some typed values within the doc, multi-level nesting, etc. You can add functional indexes (http://www.postgresql.org/docs/9.1/static/indexes-expression...) to index specific attributes within the JSON, do legit sorts over values, reasonable array queries, etc. It seems much, much closer to what Mongo does than anything you can do with hstore.
I think you just restated my comment. Do you believe expression indexes do not apply to HSTORE?
I consider both HSTORE (key/value) and the current JSON type and record functions are just intermediate steps to a fuller API [0].
[0]: http://www.postgresql.org/message-id/50EC971C.3040003@dunsla...
http://news.ycombinator.com/item?id=4764834