1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-21 00:42:43 +03:00

Redefine create_upper_paths_hook as being invoked once per upper relation.

Per discussion, this gives potential users of the hook more flexibility,
because they can build custom Paths that implement only one stage of
upper processing atop core-provided Paths for earlier stages.
This commit is contained in:
Tom Lane
2016-04-12 15:23:14 -04:00
parent 7a5f8b5c59
commit f1f01de145
3 changed files with 45 additions and 13 deletions

View File

@@ -206,7 +206,12 @@ plan_set_operations(PlannerInfo *root)
/* Add only the final path to the SETOP upperrel. */
add_path(setop_rel, path);
/* Select cheapest path (pretty easy at the moment) */
/* Let extensions possibly add some more paths */
if (create_upper_paths_hook)
(*create_upper_paths_hook) (root, UPPERREL_SETOP,
NULL, setop_rel);
/* Select cheapest path */
set_cheapest(setop_rel);
return setop_rel;