Re: [COMMITTERS] pgsql: Add notion of a "transform function" that can simplify function - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [COMMITTERS] pgsql: Add notion of a "transform function" that can simplify function
Date
Msg-id 13690.1332517009@sss.pgh.pa.us
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Add notion of a "transform function" that can simplify function  (Noah Misch <noah@leadboat.com>)
Responses Re: [COMMITTERS] pgsql: Add notion of a "transform function" that can simplify function
List pgsql-hackers
Noah Misch <noah@leadboat.com> writes:
> On Fri, Mar 23, 2012 at 10:55:52AM -0400, Tom Lane wrote:
>> Why exactly was this thought to be a good idea:
>> 
>>> * A NULL original expression disables use of transform functions while
>>> * retaining all other behaviors.

> I did it that way because it looked wrong to pass the same CoerceViaIO node to
> transforms of both the input and output functions.  Thinking about it again
> now, doing so imposes no fundamental problems.  Feel welcome to change it.

Oh, I see your point --- it's not obvious whether the current transform
is meant for the input or the output function.  Which is a very good
point.  In principle the transform function could figure out which end
of that it must be, but it would be ugly.

However, see my response to Robert: why are we passing the original node
to the transform function at all?  It would be more useful and easier to
work with to pass the function's fully-processed argument list, I believe.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Uppercase tab completion keywords in psql?
Next
From: Alvaro Herrera
Date:
Subject: Re: Finer Extension dependencies