Re: additional json functionality - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: additional json functionality
Date
Msg-id 52840936.50907@agliodbs.com
Whole thread Raw
In response to additional json functionality  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: additional json functionality  (Hannu Krosing <hannu@2ndQuadrant.com>)
List pgsql-hackers
Merlin,


> I use pg/JSON all over the place.  In several cases I have to create
> documents with ordered keys because the parser on the other side wants
> them that way -- this is not a hypothetical argument.  The current
> json serialization API handles that just fine and the hstore stuff
> coming down the pike will not.  I guess that's a done deal based on
> 'performance'.  I'm clearly not the only one to have complained about
> this though.

It's not just a matter of "performance".  It's the basic conflict of
JSON as document format vs. JSON as data storage.  For the latter,
unique, unordered keys are required, or certain functionality isn't
remotely possible: indexing, in-place key update, transformations, etc.

XML went through the same thing, which is part of how we got a bunch of
incompatible "dialects" of XML.

Now, your use case does show us that there's a case to be made for still
having text JSON even after we have binary JSON.  There's a strong
simplicity argument against that, though ...

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



pgsql-hackers by date:

Previous
From: Mike Blackwell
Date:
Subject: Re: additional json functionality
Next
From: Josh Berkus
Date:
Subject: -d option for pg_isready is broken