Re: additional json functionality - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: additional json functionality
Date
Msg-id 5283D211.60703@dunslane.net
Whole thread Raw
In response to Re: additional json functionality  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: additional json functionality
List pgsql-hackers
On 11/13/2013 11:37 AM, Merlin Moncure wrote:
>
> Yes.  and I think this is one of the major advantages of the json API
> vs hstore: you can serialize objects that hstore cannot -- at least
> not without extra scaffolding (at least, AIUI, I haven't fully
> grappled with the coming hstore stuff yet).  In other words, just
> because key order and cardinality is unimportant in an associative
> array, it does not in any way follow it is similarly unimportant for
> object serialization.

I think you're probably going to lose any argument that says we should 
necessarily preserve key order (and possibly key duplication) in 
objects. The standard doesn't support such a contention, either:
   An object is an unordered collection of zero or more name/value   pairs
   ...
   The names within an object SHOULD be unique.


Forcing us to preserve order and key duplication would be a pretty 
effective barrier to any performance improvements.

cheers

andrew




pgsql-hackers by date:

Previous
From: Mika Eloranta
Date:
Subject: [PATCH] pg_basebackup: progress report max once per second
Next
From: Peter Eisentraut
Date:
Subject: Re: nested hstore patch