diff options
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/custom-scan.sgml | 16 | ||||
-rw-r--r-- | doc/src/sgml/fdwhandler.sgml | 11 |
2 files changed, 27 insertions, 0 deletions
diff --git a/doc/src/sgml/custom-scan.sgml b/doc/src/sgml/custom-scan.sgml index cd989e7d3c4..836776b27bd 100644 --- a/doc/src/sgml/custom-scan.sgml +++ b/doc/src/sgml/custom-scan.sgml @@ -62,6 +62,7 @@ typedef struct CustomPath Path path; uint32 flags; List *custom_paths; + List *custom_restrictinfo; List *custom_private; const CustomPathMethods *methods; } CustomPath; @@ -85,6 +86,10 @@ typedef struct CustomPath An optional <structfield>custom_paths</structfield> is a list of <structname>Path</structname> nodes used by this custom-path node; these will be transformed into <structname>Plan</structname> nodes by planner. + As described below, custom paths can be created for join relations as + well. In such a case, <structfield>custom_restrictinfo</structfield> + should be used to store the set of join clauses to apply to the join the + custom path replaces. Otherwise it should be NIL. <structfield>custom_private</structfield> can be used to store the custom path's private data. Private data should be stored in a form that can be handled by <literal>nodeToString</literal>, so that debugging routines that attempt to @@ -114,6 +119,17 @@ extern PGDLLIMPORT set_join_pathlist_hook_type set_join_pathlist_hook; responsibility of the hook to minimize duplicated work. </para> + <para> + Note also that the set of join clauses to apply to the join, + which is passed as <literal>extra->restrictlist</literal>, varies + depending on the combination of inner and outer relations. A + <structname>CustomPath</structname> path generated for the + <literal>joinrel</literal> must contain the set of join clauses it uses, + which will be used by the planner to convert the + <structname>CustomPath</structname> path into a plan, if it is selected + by the planner as the best path for the <literal>joinrel</literal>. + </para> + <sect2 id="custom-scan-path-callbacks"> <title>Custom Scan Path Callbacks</title> diff --git a/doc/src/sgml/fdwhandler.sgml b/doc/src/sgml/fdwhandler.sgml index ac1717bc3c4..25832d227fb 100644 --- a/doc/src/sgml/fdwhandler.sgml +++ b/doc/src/sgml/fdwhandler.sgml @@ -334,6 +334,17 @@ GetForeignJoinPaths(PlannerInfo *root, </para> <para> + Note also that the set of join clauses to apply to the join, + which is passed as <literal>extra->restrictlist</literal>, varies + depending on the combination of inner and outer relations. A + <structname>ForeignPath</structname> path generated for the + <literal>joinrel</literal> must contain the set of join clauses it uses, + which will be used by the planner to convert the + <structname>ForeignPath</structname> path into a plan, if it is selected + by the planner as the best path for the <literal>joinrel</literal>. + </para> + + <para> If a <structname>ForeignPath</structname> path is chosen for the join, it will represent the entire join process; paths generated for the component tables and subsidiary joins will not be used. Subsequent processing of |