aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeMaterial.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-03-23 00:54:04 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-03-23 00:54:04 +0000
commit598b97dc9b8da1673c553afb57266e69ed27471e (patch)
treeca3687cfa8480da62d5c949c097b634951098adc /src/backend/executor/nodeMaterial.c
parentdeb519611bb83f91916461ca08452dbab5faa66a (diff)
downloadpostgresql-598b97dc9b8da1673c553afb57266e69ed27471e.tar.gz
postgresql-598b97dc9b8da1673c553afb57266e69ed27471e.zip
Avoid a useless tuple copy within nodeMaterial. Neil Conway
Diffstat (limited to 'src/backend/executor/nodeMaterial.c')
-rw-r--r--src/backend/executor/nodeMaterial.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/backend/executor/nodeMaterial.c b/src/backend/executor/nodeMaterial.c
index 1fd7a4d0307..3c096356a37 100644
--- a/src/backend/executor/nodeMaterial.c
+++ b/src/backend/executor/nodeMaterial.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/nodeMaterial.c,v 1.61 2008/01/01 19:45:49 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/nodeMaterial.c,v 1.62 2008/03/23 00:54:04 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -124,18 +124,17 @@ ExecMaterial(MaterialState *node)
}
/*
- * Append returned tuple to tuplestore. NOTE: because the tuplestore
- * is certainly in EOF state, its read position will move forward over
- * the added tuple. This is what we want.
+ * Append a copy of the returned tuple to tuplestore. NOTE: because
+ * the tuplestore is certainly in EOF state, its read position will
+ * move forward over the added tuple. This is what we want.
*/
if (tuplestorestate)
tuplestore_puttupleslot(tuplestorestate, outerslot);
/*
- * And return a copy of the tuple. (XXX couldn't we just return the
- * outerslot?)
+ * We can just return the subplan's returned tuple, without copying.
*/
- return ExecCopySlot(slot, outerslot);
+ return outerslot;
}
/*