aboutsummaryrefslogtreecommitdiff
path: root/src/backend/nodes/copyfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-11-30 05:21:03 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-11-30 05:21:03 +0000
commit935969415a90065d4bc4b2643b4c9c50518c934b (patch)
tree49488aee7f8c95a338e4b53024d4aaeb36d2abcc /src/backend/nodes/copyfuncs.c
parent829cedc8cf04801c8fce49afa5dd57b3833b969f (diff)
downloadpostgresql-935969415a90065d4bc4b2643b4c9c50518c934b.tar.gz
postgresql-935969415a90065d4bc4b2643b4c9c50518c934b.zip
Be more realistic about plans involving Materialize nodes: take their
cost into account while planning.
Diffstat (limited to 'src/backend/nodes/copyfuncs.c')
-rw-r--r--src/backend/nodes/copyfuncs.c32
1 files changed, 28 insertions, 4 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c
index 7798913cde5..d11b5ed201f 100644
--- a/src/backend/nodes/copyfuncs.c
+++ b/src/backend/nodes/copyfuncs.c
@@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.224 2002/11/30 00:08:16 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.225 2002/11/30 05:21:01 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1143,6 +1143,27 @@ _copyResultPath(ResultPath *from)
}
/*
+ * _copyMaterialPath
+ */
+static MaterialPath *
+_copyMaterialPath(MaterialPath *from)
+{
+ MaterialPath *newnode = makeNode(MaterialPath);
+
+ /*
+ * copy node superclass fields
+ */
+ CopyPathFields((Path *) from, (Path *) newnode);
+
+ /*
+ * copy remainder of node
+ */
+ COPY_NODE_FIELD(subpath);
+
+ return newnode;
+}
+
+/*
* CopyJoinPathFields
*
* This function copies the fields of the JoinPath node. It is used by
@@ -2739,6 +2760,9 @@ copyObject(void *from)
case T_RelOptInfo:
retval = _copyRelOptInfo(from);
break;
+ case T_IndexOptInfo:
+ retval = _copyIndexOptInfo(from);
+ break;
case T_Path:
retval = _copyPath(from);
break;
@@ -2754,6 +2778,9 @@ copyObject(void *from)
case T_ResultPath:
retval = _copyResultPath(from);
break;
+ case T_MaterialPath:
+ retval = _copyMaterialPath(from);
+ break;
case T_NestPath:
retval = _copyNestPath(from);
break;
@@ -2772,9 +2799,6 @@ copyObject(void *from)
case T_JoinInfo:
retval = _copyJoinInfo(from);
break;
- case T_IndexOptInfo:
- retval = _copyIndexOptInfo(from);
- break;
case T_InnerIndexscanInfo:
retval = _copyInnerIndexscanInfo(from);
break;