summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-03-14 20:04:44 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-03-14 20:04:48 -0400
commit101fd9349eddb7e9ed84a239145d5230a9bc7336 (patch)
tree8b77f95222f0a8342b45e6606a7e77046fdead3e /src/include
parentbe6de4c1215a8ad5607b1fcc7e9e6da1de780877 (diff)
Add a GetForeignUpperPaths callback function for FDWs.
This is basically like the just-added create_upper_paths_hook, but control is funneled only to the FDW responsible for all the baserels of the current query; so providing such a callback is much less likely to add useless overhead than using the hook function is. The documentation is a bit sketchy. We'll likely want to improve it, and/or adjust the call conventions, when we get some experience with actually using this callback. Hopefully somebody will find time to experiment with it before 9.6 feature freeze.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/foreign/fdwapi.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/include/foreign/fdwapi.h b/src/include/foreign/fdwapi.h
index ae3c230d667..71643602823 100644
--- a/src/include/foreign/fdwapi.h
+++ b/src/include/foreign/fdwapi.h
@@ -59,6 +59,9 @@ typedef void (*GetForeignJoinPaths_function) (PlannerInfo *root,
JoinType jointype,
JoinPathExtraData *extra);
+typedef void (*GetForeignUpperPaths_function) (PlannerInfo *root,
+ RelOptInfo *scan_join_rel);
+
typedef void (*AddForeignUpdateTargets_function) (Query *parsetree,
RangeTblEntry *target_rte,
Relation target_relation);
@@ -166,6 +169,9 @@ typedef struct FdwRoutine
/* Functions for remote-join planning */
GetForeignJoinPaths_function GetForeignJoinPaths;
+ /* Functions for remote upper-relation (post scan/join) planning */
+ GetForeignUpperPaths_function GetForeignUpperPaths;
+
/* Functions for updating foreign tables */
AddForeignUpdateTargets_function AddForeignUpdateTargets;
PlanForeignModify_function PlanForeignModify;