Re: Fixed length datatypes. WAS [GENERAL] UUID's as - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Fixed length datatypes. WAS [GENERAL] UUID's as
Date
Msg-id 20060701150653.GH24775@svana.org
Whole thread Raw
In response to Re: Fixed length datatypes. WAS [GENERAL] UUID's as  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Fixed length datatypes. WAS [GENERAL] UUID's as  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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.

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Fixed length datatypes. WAS [GENERAL] UUID's as
Next
From: Tom Lane
Date:
Subject: Re: Fixed length datatypes. WAS [GENERAL] UUID's as