Re: [HACKERS] using CustomScan to inject nodes into the plan

2015-03-11 Thread Tomas Vondra
On 11.3.2015 21:53, Tom Lane wrote: > Tomas Vondra writes: >> I've been experimenting with using CustomScan to inject nodes into the >> plan - I'm experimenting a bit, and this seemed like a nice way to do >> that in an extension, outside the tree. > >> Sadly set_rel_pathlist_hook is not flexible

Re: [HACKERS] using CustomScan to inject nodes into the plan

2015-03-11 Thread Tom Lane
Tomas Vondra writes: > I've been experimenting with using CustomScan to inject nodes into the > plan - I'm experimenting a bit, and this seemed like a nice way to do > that in an extension, outside the tree. > Sadly set_rel_pathlist_hook is not flexible enough, because it only > allows overriding

Re: [HACKERS] using CustomScan to inject nodes into the plan

2015-03-11 Thread Robert Haas
On Wed, Mar 11, 2015 at 3:48 PM, Tomas Vondra wrote: > The one problem with this 'combined' solution however is that CustomScan > requires scanrelid - a valid index into the range table. When injecting > the node directly above a Scan node, that seems to work just fine (just > use the same value),

[HACKERS] using CustomScan to inject nodes into the plan

2015-03-11 Thread Tomas Vondra
Hi there, I've been experimenting with using CustomScan to inject nodes into the plan - I'm experimenting a bit, and this seemed like a nice way to do that in an extension, outside the tree. Sadly set_rel_pathlist_hook is not flexible enough, because it only allows overriding paths for base relat