Posted Sep 12, 2012 10:42 UTC (Wed) by ringerc (subscriber, #3071)
In reply to: Why json by andresfreund
Parent article: PostgreSQL 9.2 released
Once there's a json lookup operator (say implementing the [] operator for json to get the value of a key, or a path lookup function kind of like xpath provides for xml) then a functional index might be reasonably practical, at least if the result is a scalar.
Right now the lack of the concept of a "scalar json value" (due to an IMO over-eager interpretation of the JSON "spec") is frustrating all sorts of things, including proper json constructor functions.
More general indexing might be done through GiST, but I imagine it'd be a pretty complicated job involving extracting paths-to-values.