Skip site navigation (1) Skip section navigation (2)

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Add notion of a "transform function" that can simplify function
Date: 2012-03-23 16:52:31
Message-ID: 15020.1332521551@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
Noah Misch <noah(at)leadboat(dot)com> writes:
> On Fri, Mar 23, 2012 at 11:31:54AM -0400, Tom Lane wrote:
>> ... I've not looked
>> yet at the existing transform functions, but why would they want to know
>> about the original node at all?

> You suggested[1] passing an Expr instead of an argument list, and your reasons
> still seem good to me.  That said, perhaps we should send both the original
> Expr and the simplified argument list.  That will help if we ever want to
> fully simplify x - y * 0.  (Then again, the feature is undocumented and we
> could change it when that day comes.)

I believe what I had in mind back then was that we'd build a new FuncExpr
containing the simplified argument list.  On reflection that's probably
the most future-proof way to do it, since otherwise anytime we change
the contents of FuncExpr, we'll be faced with possibly having to change
the signature of protransform functions.

Will go see what I can do with that.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Robert HaasDate: 2012-03-23 17:03:48
Subject: Re: query cache
Previous:From: Robert HaasDate: 2012-03-23 16:49:38
Subject: Re: Reporting WAL file containing checkpoint's REDO record in pg_controldata's result

pgsql-committers by date

Next:From: Tom LaneDate: 2012-03-23 21:30:19
Subject: pgsql: Code review for protransform patches.
Previous:From: Tom LaneDate: 2012-03-23 16:27:37
Subject: Re: [COMMITTERS] pgsql: Add notion of a "transform function" that can simplify function

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group