Re: [HACKERS] LANGUAGE sql functions don't use the custom plan logic

2015-07-10 Thread Andres Freund
On 2015-07-10 09:52:30 -0400, Tom Lane wrote: > There's a whole lot of ways in which the current implementation of > SQL-language functions leaves things to be desired. Yea. > What did you run into exactly? A generic plan was used on a partitioned table. Normally the function could be inlined s

Re: [HACKERS] LANGUAGE sql functions don't use the custom plan logic

2015-07-10 Thread Tom Lane
Andres Freund writes: > I recently was forcfully reminded that sql functions don't use the > plancache.c infrastructure. I was sort of aware of that, but I didn't > think far enough ahead that that also implies we'll not use custom plans > for statements with parameters when it'd be helpful. Ther

[HACKERS] LANGUAGE sql functions don't use the custom plan logic

2015-07-10 Thread Andres Freund
Hi, I recently was forcfully reminded that sql functions don't use the plancache.c infrastructure. I was sort of aware of that, but I didn't think far enough ahead that that also implies we'll not use custom plans for statements with parameters when it'd be helpful. That's imo quite the trap. Sho