From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
Cc: | Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: additional json functionality |
Date: | 2013-11-13 19:25:05 |
Message-ID: | 5283D211.60703@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2013-11-13 19:53:44 | Re: nested hstore patch |
Previous Message | Mika Eloranta | 2013-11-13 18:51:37 | [PATCH] pg_basebackup: progress report max once per second |