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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user