Re: Oid registry - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Oid registry
Date
Msg-id 50622ADB.9080307@gmx.net
Whole thread Raw
In response to Re: Oid registry  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Oid registry  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Oid registry  (Hannu Krosing <hannu@krosing.net>)
List pgsql-hackers
On 9/25/12 5:58 PM, Tom Lane wrote:
> Yes ... but I really don't want to go down the path of treating those as
> new type properties; it doesn't scale.  (And please don't tell me that
> JSON is the last word in container types and there will never be
> requests for any more of these.)

Yeah, I didn't like that part either, but we only add one every five
years or so.

> Can we define these functions as being the cast-from-foo-to-json and
> cast-from-foo-to-xml functions?  That would let us use the existing cast
> infrastructure to manage them.

Sounds attractive, but there might be some problems in the details.  For
example, you can't cast scalar values to valid json values, because a
valid json value can only be a dictionary or an array.  If we had a flag
of some kind saying "cast from foo to json, but only when part of a
larger json serialization, not by itself", then it might work.



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Oid registry
Next
From: Daniel Farina
Date:
Subject: Re: Switching timeline over streaming replication