Re: Oid registry - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Oid registry
Date
Msg-id 1204.1348611723@sss.pgh.pa.us
Whole thread Raw
In response to Re: Oid registry  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Oid registry  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> On 9/25/12 5:58 PM, Tom Lane wrote:
>> 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.

Actually, after reading another message you sent, I thought you were
going to respond that your proposed transforms feature would cover it.

If there's some reason that's not what to use, I guess we could add
another optional argument to cast support functions; but that interface
is already rather overloaded.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Daniel Farina
Date:
Subject: Re: Switching timeline over streaming replication
Next
From: John R Pierce
Date:
Subject: Re: Switching timeline over streaming replication