On Sat, Jul 01, 2006 at 10:58:05AM -0400, Andrew Dunstan wrote:
> Tom Lane wrote:
> >The output function, however, would be quite a trick.
> >It's not going to receive anything except the Datum itself.
> I understand the reasons for this limitation of output functions, but I 
> have now seen it bite several times. Maybe we need a little out of the 
> box thinking on this. I have spent a while taxing my meagre brain on it 
> over the last few months, without much success ;-(

The thing is, in a lot of other contexts it can work easily because
fcinfo->flinfo->fn_expr points the expression node for this function
call, which means you can extract the relevent data out of that. This
field is simply not filled in for type input/output functions.

Something that has been discussed in the past is allowing non-strict
type input/output functions to be evaluated at query execution time,
rather than during parse time. This would give the type input/output
functions the Expr node they need to extract this info.

I have no idea how easy/hard this would be.

Have a nice day,
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to 
> litigate.

Attachment: signature.asc
Description: Digital signature

Reply via email to