Re: Inlining functions with "expensive" parameters

2017-11-21 Thread Tom Lane
I wrote: > Robert Haas writes: >> 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

Re: Inlining functions with "expensive" parameters

2017-11-21 Thread Tom Lane
Robert Haas writes: > On Thu, Nov 16, 2017 at 2:51 PM, Andres Freund 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

Re: Inlining functions with "expensive" parameters

2017-11-17 Thread Andres Freund
On November 17, 2017 5:15:57 AM PST, Paul Ramsey wrote: >On Thu, Nov 16, 2017 at 12:37 PM, Andres Freund >wrote: > >> Hi, >> >> On 2017-11-16 15:27:59 -0500, Tom Lane wrote: >> > Andres Freund writes: >> > > On November 16,

Re: Inlining functions with "expensive" parameters

2017-11-17 Thread Paul Ramsey
On Thu, Nov 16, 2017 at 12:37 PM, Andres Freund wrote: > Hi, > > On 2017-11-16 15:27:59 -0500, Tom Lane wrote: > > Andres Freund writes: > > > On November 16, 2017 11:44:52 AM PST, Tom Lane > wrote: > > >> Yeah, there's no mechanism

Re: Inlining functions with "expensive" parameters

2017-11-16 Thread Andres Freund
Hi, On 2017-11-16 15:27:59 -0500, Tom Lane wrote: > Andres Freund writes: > > On November 16, 2017 11:44:52 AM PST, Tom Lane wrote: > >> Yeah, there's no mechanism like that now, but there could be. > > > Right, but it doesn't sound that hard to

Re: Inlining functions with "expensive" parameters

2017-11-16 Thread Tom Lane
Andres Freund writes: > On November 16, 2017 11:44:52 AM PST, Tom Lane wrote: >> Yeah, there's no mechanism like that now, but there could be. > Right, but it doesn't sound that hard to introduce. Basically there'd need to > be a WithParamValue node,

Re: Inlining functions with "expensive" parameters

2017-11-16 Thread Andres Freund
Hi, On 2017-11-16 09:37:29 -0800, Paul Ramsey wrote: > On Thu, Nov 9, 2017 at 12:11 PM, Paul Ramsey > wrote: > > > All, > > > > As we try and make PostGIS more "parallel sensitive" we have been added > > costs to our functions, so that their relative CPU cost is more