On Mon, Dec 5, 2011 at 3:12 PM, Bruce Momjian <br...@momjian.us> wrote: > Where are we with adding JSON for Postgres 9.2? We got bogged down in > the data representation last time we discussed this.
We're waiting for you to send a patch that resolves all previously-raised issues. :-) In all seriousness, I think the right long-term answer here is to have two data types - one that simply validates JSON and stores it as text, and the other of which uses some binary encoding. The first would be similar to our existing xml datatype and would be suitable for cases when all or nearly all of your storage and retrieval operations will be full-column operations, and the json types is basically just providing validation. The second would be optimized for pulling out (or, perhaps, replacing) pieces of arrays or hashes, but would have additional serialization/deserialization overhead when working with the entire value. As far as I can see, these could be implemented independently of each other and in either order, but no one seems to have yet found the round tuits. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers