Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Mar 17, 2016 at 2:31 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> So what I would now propose is
>>
>> typedef void (*create_upper_paths_hook_type) (PlannerInfo *root,
>> UpperRelationKind stage,
>> RelOptInfo *input_rel);
>>
>> and have this invoked at each stage right before we call
>> create_grouping_paths, create_window_paths, etc.
> Works for me.
Now that the commitfest crunch is over, I went back and took care of
this loose end. I ended up passing the output_rel as well for each
step, to save hook users from having to look that up for themselves.
The hook calls are placed immediately before set_cheapest() for each
upper rel, so that all core-built Paths are available for inspection.
regards, tom lane