aboutsummaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw/postgres_fdw.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-03-14 17:31:28 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-03-14 17:31:28 -0400
commit28048cbaa285b8ac46940e4b39f985d9885fc698 (patch)
tree419821d979318f9474d05d52b619fba5ad568d32 /contrib/postgres_fdw/postgres_fdw.c
parent307c78852f516042cebacaed411a0391bfeb2129 (diff)
downloadpostgresql-28048cbaa285b8ac46940e4b39f985d9885fc698.tar.gz
postgresql-28048cbaa285b8ac46940e4b39f985d9885fc698.zip
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.
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.c')
-rw-r--r--contrib/postgres_fdw/postgres_fdw.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c
index d4ee2a8548f..96875b41848 100644
--- a/contrib/postgres_fdw/postgres_fdw.c
+++ b/contrib/postgres_fdw/postgres_fdw.c
@@ -793,6 +793,7 @@ postgresGetForeignPaths(PlannerInfo *root,
* to estimate cost and size of this path.
*/
path = create_foreignscan_path(root, baserel,
+ NULL, /* default pathtarget */
fpinfo->rows,
fpinfo->startup_cost,
fpinfo->total_cost,
@@ -964,6 +965,7 @@ postgresGetForeignPaths(PlannerInfo *root,
/* Make the path */
path = create_foreignscan_path(root, baserel,
+ NULL, /* default pathtarget */
rows,
startup_cost,
total_cost,
@@ -3565,6 +3567,7 @@ add_paths_with_pathkeys_for_rel(PlannerInfo *root, RelOptInfo *rel,
add_path(rel, (Path *)
create_foreignscan_path(root, rel,
+ NULL,
rows,
startup_cost,
total_cost,
@@ -3702,6 +3705,7 @@ postgresGetForeignJoinPaths(PlannerInfo *root,
*/
joinpath = create_foreignscan_path(root,
joinrel,
+ NULL, /* default pathtarget */
rows,
startup_cost,
total_cost,