git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: deb5196)
Avoid a useless tuple copy within nodeMaterial. Neil Conway
2008年3月23日 00:54:04 +0000 (00:54 +0000)
2008年3月23日 00:54:04 +0000 (00:54 +0000)

diff --git a/src/backend/executor/nodeMaterial.c b/src/backend/executor/nodeMaterial.c
index 1fd7a4d0307cfdec003584b88fd5ad1c2ac64d0a..3c096356a37b03b6e613b1329c58b899faef32d7 100644 (file)
--- 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;
}
/*
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /