Re: JSON for PG 9.2 - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: JSON for PG 9.2
Date
Msg-id CAHyXU0y4WxeT1Y+y-yCgj5scNb7nN_tNFTmurpMLFJKoshV5GA@mail.gmail.com
Whole thread Raw
In response to Re: JSON for PG 9.2  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: JSON for PG 9.2  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
List pgsql-hackers
On Sun, Dec 18, 2011 at 11:21 AM, Andrew Dunstan <andrew@dunslane.net> wrote:
>
>
> On 12/18/2011 12:17 PM, Merlin Moncure wrote:
>>
>> One small note about the json type being an extension -- this probably
>> means the json type oid won't be fixed -- not a huge deal but it could
>> affect some corner cases with binary format consumers.
>
> Why would that matter more for JSON than for any other non-core type?

well, it's a minor headache for all the oid-isn't-in-pgtypes.h types,
and only then for high traffic types (which presumably json will be).a while back we coded up a reworked dblink that
wasvariadic and
 
could optionally transfer data between database with the binary wire
format.   any container of a user defined (by oid) type had to be sent
strictly as text which is a big performance hit for certain types.
recent postgres has an undocumented facility to force type oids to a
particular value, but the type definition being inside the create
extension script makes this problematic.

this is a pretty far out objection though, and I could certainly work
around the problem if necessary, but there is some dependency on
pg_types.h in the wild.

merlin


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: JSON for PG 9.2
Next
From: Dimitri Fontaine
Date:
Subject: Re: JSON for PG 9.2