mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Allow callers of create_foreignscan_path to specify nondefault PathTarget.
Although the default choice of rel->reltarget should typically be sufficient for scan or join paths, it's not at all sufficient for the purposes PathTargets were invented for; in particular not for upper-relation Paths. So break API compatibility by adding a PathTarget argument to create_foreignscan_path(). To ease updating of existing code, accept a NULL value of the argument as selecting rel->reltarget.
This commit is contained in:
@ -524,6 +524,7 @@ fileGetForeignPaths(PlannerInfo *root,
|
||||
*/
|
||||
add_path(baserel, (Path *)
|
||||
create_foreignscan_path(root, baserel,
|
||||
NULL, /* default pathtarget */
|
||||
baserel->rows,
|
||||
startup_cost,
|
||||
total_cost,
|
||||
|
Reference in New Issue
Block a user