Re: JSON for PG 9.2
Merlin Moncure <mmoncure@gmail.com>
From: Merlin Moncure <mmoncure@gmail.com>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Magnus Hagander <magnus@hagander.net>, dimitri@2ndquadrant.fr, Jan Urbański <wulczer@wulczer.org>, Robert Haas <robertmhaas@gmail.com>, "David E. Wheeler" <david@kineticode.com>, Simon Riggs <simon@2ndquadrant.com>, Joey Adams <joeyadams3.14159@gmail.com>, Bruce Momjian <bruce@momjian.us>, Claes Jakobsson <claes@gluefinance.com>, PostgreSQL-development Hackers <pgsql-hackers@postgresql.org>, Jan Wieck <janwieck@yahoo.com>
Date: 2011-12-18T17:34:21Z
Lists: 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 was variadic 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