On Thu, Nov 16, 2017 at 2:51 PM, Andres Freund <and...@anarazel.de> wrote: > Right, but it doesn't sound that hard to introduce. Basically there'd need to > be a WithParamValue node, that first evaluates parameters and then executes > the child expression. I'm thinking of doing this hierarchically so there's > less issues with 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