diff --git a/doc/src/sgml/fdwhandler.sgml b/doc/src/sgml/fdwhandler.sgml index ffbd1e3..d018edb 100644 --- a/doc/src/sgml/fdwhandler.sgml +++ b/doc/src/sgml/fdwhandler.sgml @@ -334,34 +334,20 @@ GetForeignJoinPaths (PlannerInfo *root, remote join cannot be found from the system catalogs, the FDW must fill fdw_scan_tlist with an appropriate list of TargetEntry nodes, representing the set of columns it will supply at run time in the tuples it returns. See for additional information. - - -void -GetExistingLocalJoinPath(RelOptInfo *joinrel) - - The function returns copy of a local join path, which can be converted - into an alternative local join plan, which may be useful when - implementing a RecheckForeignScan method. The function - searches for an unparameterized path in the pathlist of given - joinrel. If it does not find such a path, it returns NULL, in - which case a foreign data wrapper may build the local path by itself or - may choose not to create access paths for that join. - - FDW Routines For Updating Foreign Tables If an FDW supports writable foreign tables, it should provide some or all of the following callback functions depending on the needs and capabilities of the FDW: @@ -803,21 +789,21 @@ RecheckForeignScan (ForeignScanState *node, TupleTableSlot *slot); To implement join pushdown, a foreign data wrapper will typically construct an alternative local join plan which is used only for rechecks; this will become the outer subplan of the ForeignScan. When a recheck is required, this subplan can be executed and the resulting tuple can be stored in the slot. This plan need not be efficient since no base table will return more than one row; for example, it may implement all joins as nested loops. GetExistingLocalJoinPath may be used to search existing paths for a suitable local join path, which can be used as the alternative - local join plan. + local join plan. See for details. FDW Routines for <command>EXPLAIN</> void ExplainForeignScan (ForeignScanState *node, @@ -1131,20 +1117,34 @@ GetForeignDataWrapperByName(const char *name, bool missing_ok); ForeignServer * GetForeignServerByName(const char *name, bool missing_ok); This function returns a ForeignServer object for the foreign server with the given name. If the server is not found, return NULL if missing_ok is true, otherwise raise an error. + + +Path * +GetExistingLocalJoinPath(RelOptInfo *joinrel) + + The function returns copy of a local join path, which can be converted + into an alternative local join plan, which may be useful when + implementing a RecheckForeignScan method. The function + searches for an unparameterized path in the pathlist of given + joinrel. If it does not find such a path, it returns NULL, in + which case a foreign data wrapper may build the local path by itself or + may choose not to create access paths for that join. + + Foreign Data Wrapper Query Planning The FDW callback functions GetForeignRelSize, GetForeignPaths, GetForeignPlan, PlanForeignModify, and GetForeignJoinPaths must fit into the workings of the PostgreSQL planner.