summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/executor/executor.h3
-rw-r--r--src/include/executor/nodeTidscan.h3
-rw-r--r--src/include/nodes/nodes.h16
-rw-r--r--src/include/nodes/relation.h14
-rw-r--r--src/include/optimizer/cost.h4
-rw-r--r--src/include/optimizer/pathnode.h3
6 files changed, 25 insertions, 18 deletions
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h
index a12c31bff7c..312c56fa85c 100644
--- a/src/include/executor/executor.h
+++ b/src/include/executor/executor.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: executor.h,v 1.78 2002/09/04 20:31:42 momjian Exp $
+ * $Id: executor.h,v 1.79 2002/11/30 05:21:03 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -33,6 +33,7 @@
extern void ExecReScan(Plan *node, ExprContext *exprCtxt, Plan *parent);
extern void ExecMarkPos(Plan *node);
extern void ExecRestrPos(Plan *node);
+extern bool ExecSupportsMarkRestore(NodeTag plantype);
/*
* prototypes from functions in execJunk.c
diff --git a/src/include/executor/nodeTidscan.h b/src/include/executor/nodeTidscan.h
index b164100690f..72e6c3e78f2 100644
--- a/src/include/executor/nodeTidscan.h
+++ b/src/include/executor/nodeTidscan.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeTidscan.h,v 1.9 2002/06/20 20:29:49 momjian Exp $
+ * $Id: nodeTidscan.h,v 1.10 2002/11/30 05:21:03 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -20,6 +20,7 @@ extern TupleTableSlot *ExecTidScan(TidScan *node);
extern void ExecTidReScan(TidScan *node, ExprContext *exprCtxt, Plan *parent);
extern void ExecEndTidScan(TidScan *node);
extern void ExecTidMarkPos(TidScan *node);
+extern void ExecTidRestrPos(TidScan *node);
extern bool ExecInitTidScan(TidScan *node, EState *estate, Plan *parent);
extern int ExecCountSlotsTidScan(TidScan *node);
extern void ExecTidReScan(TidScan *node, ExprContext *exprCtxt, Plan *parent);
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index d2b984de4f8..a9cd095f94e 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodes.h,v 1.124 2002/11/24 21:52:14 tgl Exp $
+ * $Id: nodes.h,v 1.125 2002/11/30 05:21:03 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -75,6 +75,7 @@ typedef enum NodeTag
* TAGS FOR PLANNER NODES (relation.h)
*/
T_RelOptInfo = 200,
+ T_IndexOptInfo,
T_Path,
T_IndexPath,
T_NestPath,
@@ -83,10 +84,10 @@ typedef enum NodeTag
T_TidPath,
T_AppendPath,
T_ResultPath,
+ T_MaterialPath,
T_PathKeyItem,
T_RestrictInfo,
T_JoinInfo,
- T_IndexOptInfo,
T_InnerIndexscanInfo,
/*
@@ -289,17 +290,6 @@ extern Node *newNodeMacroHolder;
#define IsA(nodeptr,_type_) (nodeTag(nodeptr) == T_##_type_)
/* ----------------------------------------------------------------
- * IsA functions (no inheritance any more)
- * ----------------------------------------------------------------
- */
-#define IsA_JoinPath(jp) \
- (IsA(jp, NestPath) || IsA(jp, MergePath) || IsA(jp, HashPath))
-
-#define IsA_Join(jp) \
- (IsA(jp, Join) || IsA(jp, NestLoop) || \
- IsA(jp, MergeJoin) || IsA(jp, HashJoin))
-
-/* ----------------------------------------------------------------
* extern declarations follow
* ----------------------------------------------------------------
*/
diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h
index 4c06224ecce..5f6ad686dff 100644
--- a/src/include/nodes/relation.h
+++ b/src/include/nodes/relation.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: relation.h,v 1.71 2002/11/30 00:08:22 tgl Exp $
+ * $Id: relation.h,v 1.72 2002/11/30 05:21:03 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -406,6 +406,18 @@ typedef struct ResultPath
} ResultPath;
/*
+ * MaterialPath represents use of a Material plan node, i.e., caching of
+ * the output of its subpath. This is used when the subpath is expensive
+ * and needs to be scanned repeatedly, or when we need mark/restore ability
+ * and the subpath doesn't have it.
+ */
+typedef struct MaterialPath
+{
+ Path path;
+ Path *subpath;
+} MaterialPath;
+
+/*
* All join-type paths share these fields.
*/
diff --git a/src/include/optimizer/cost.h b/src/include/optimizer/cost.h
index fd9a3c1def0..5bb5092571b 100644
--- a/src/include/optimizer/cost.h
+++ b/src/include/optimizer/cost.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: cost.h,v 1.48 2002/11/21 00:42:19 tgl Exp $
+ * $Id: cost.h,v 1.49 2002/11/30 05:21:03 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -60,6 +60,8 @@ extern void cost_functionscan(Path *path, Query *root,
RelOptInfo *baserel);
extern void cost_sort(Path *path, Query *root,
List *pathkeys, Cost input_cost, double tuples, int width);
+extern void cost_material(Path *path,
+ Cost input_cost, double tuples, int width);
extern void cost_agg(Path *path, Query *root,
AggStrategy aggstrategy, int numAggs,
int numGroupCols, double numGroups,
diff --git a/src/include/optimizer/pathnode.h b/src/include/optimizer/pathnode.h
index 61c433e12dd..65abeb0cf61 100644
--- a/src/include/optimizer/pathnode.h
+++ b/src/include/optimizer/pathnode.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pathnode.h,v 1.45 2002/11/06 00:00:45 tgl Exp $
+ * $Id: pathnode.h,v 1.46 2002/11/30 05:21:03 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -37,6 +37,7 @@ extern TidPath *create_tidscan_path(Query *root, RelOptInfo *rel,
extern AppendPath *create_append_path(RelOptInfo *rel, List *subpaths);
extern ResultPath *create_result_path(RelOptInfo *rel, Path *subpath,
List *constantqual);
+extern MaterialPath *create_material_path(RelOptInfo *rel, Path *subpath);
extern Path *create_subqueryscan_path(RelOptInfo *rel);
extern Path *create_functionscan_path(Query *root, RelOptInfo *rel);