Re: Inlining functions with "expensive" parameters - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Inlining functions with "expensive" parameters
Date
Msg-id CA+TgmoZd+X-A0ZgGd9zzzC_tYcqPsY7uS=DER3ox0f+hFZpq3w@mail.gmail.com
Whole thread Raw
In response to Re: Inlining functions with "expensive" parameters  (Andres Freund <andres@anarazel.de>)
Responses Re: Inlining functions with "expensive" parameters  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Inlining functions with "expensive" parameters  (Andres Freund <andres@anarazel.de>)
Re: Inlining functions with "expensive" parameters  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Thu, Nov 16, 2017 at 2:51 PM, Andres Freund <andres@anarazel.de> wrote:
> Right, but it doesn't sound that hard to introduce. Basically there'd need to be a WithParamValue node,  that first
evaluatesparameters and then executes the child expression. I'm thinking of doing this hierarchically so there's less
issueswith the setting of the param value being moved away from the child expression using it. 

I don't quite follow the need for this.  I mean, if we just stick a
Param reference in there and create a corresponding InitPlan, the
Param will be evaluated on demand, right?  Is the point of the new
node to make sure that the Param gets re-evaluated when needed?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Ildus Kurbangaliev
Date:
Subject: Re: [HACKERS] Custom compression methods
Next
From: Tom Lane
Date:
Subject: Re: Inlining functions with "expensive" parameters