summaryrefslogtreecommitdiff
path: root/src/include/nodes
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2015-06-26 09:40:47 -0400
committerRobert Haas <rhaas@postgresql.org>2015-06-26 09:40:47 -0400
commit5ca611841bcd37c7ee8448c46c8398ef8d8edcc4 (patch)
tree492d1f96b9f0b3a25e321f6d58cba98b0a95bfd2 /src/include/nodes
parent4b8e24b9ad308c30dbe2184e06848e638e018114 (diff)
downloadpostgresql-5ca611841bcd37c7ee8448c46c8398ef8d8edcc4.tar.gz
Improve handling of CustomPath/CustomPlan(State) children.
Allow CustomPath to have a list of paths, CustomPlan a list of plans, and CustomPlanState a list of planstates known to the core system, so that custom path/plan providers can more reasonably use this infrastructure for nodes with multiple children. KaiGai Kohei, per a design suggestion from Tom Lane, with some further kibitzing by me.
Diffstat (limited to 'src/include/nodes')
-rw-r--r--src/include/nodes/execnodes.h1
-rw-r--r--src/include/nodes/plannodes.h1
-rw-r--r--src/include/nodes/relation.h4
3 files changed, 5 insertions, 1 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index db5bd7faf0..541ee18735 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -1616,6 +1616,7 @@ typedef struct CustomScanState
{
ScanState ss;
uint32 flags; /* mask of CUSTOMPATH_* flags, see relation.h */
+ List *custom_ps; /* list of child PlanState nodes, if any */
const CustomExecMethods *methods;
} CustomScanState;
diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h
index d967219c0b..5f538f3e8c 100644
--- a/src/include/nodes/plannodes.h
+++ b/src/include/nodes/plannodes.h
@@ -550,6 +550,7 @@ typedef struct CustomScan
{
Scan scan;
uint32 flags; /* mask of CUSTOMPATH_* flags, see relation.h */
+ List *custom_plans; /* list of Plan nodes, if any */
List *custom_exprs; /* expressions that custom code may evaluate */
List *custom_private; /* private data for custom code */
List *custom_scan_tlist; /* optional tlist describing scan
diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h
index 33b0874570..cb916ea8e1 100644
--- a/src/include/nodes/relation.h
+++ b/src/include/nodes/relation.h
@@ -929,7 +929,8 @@ typedef struct CustomPathMethods
RelOptInfo *rel,
struct CustomPath *best_path,
List *tlist,
- List *clauses);
+ List *clauses,
+ List *custom_plans);
/* Optional: print additional fields besides "private" */
void (*TextOutCustomPath) (StringInfo str,
const struct CustomPath *node);
@@ -939,6 +940,7 @@ typedef struct CustomPath
{
Path path;
uint32 flags; /* mask of CUSTOMPATH_* flags, see above */
+ List *custom_paths; /* list of child Path nodes, if any */
List *custom_private;
const CustomPathMethods *methods;
} CustomPath;