aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeTee.c
diff options
context:
space:
mode:
authorVadim B. Mikheev <vadim4o@yahoo.com>1998-11-27 19:52:36 +0000
committerVadim B. Mikheev <vadim4o@yahoo.com>1998-11-27 19:52:36 +0000
commit6beba218d7f6f764e946751df6dc0d0180da05fa (patch)
tree2801029d61d798d6150bb43a24561a4615aedb8b /src/backend/executor/nodeTee.c
parent2435c7d501b0a3129f6fc597a9c85863541cd596 (diff)
downloadpostgresql-6beba218d7f6f764e946751df6dc0d0180da05fa.tar.gz
postgresql-6beba218d7f6f764e946751df6dc0d0180da05fa.zip
New HeapTuple structure/interface.
Diffstat (limited to 'src/backend/executor/nodeTee.c')
-rw-r--r--src/backend/executor/nodeTee.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/backend/executor/nodeTee.c b/src/backend/executor/nodeTee.c
index 623a43b9e0c..7b0f7f1755e 100644
--- a/src/backend/executor/nodeTee.c
+++ b/src/backend/executor/nodeTee.c
@@ -15,7 +15,7 @@
* ExecEndTee
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.24 1998/10/08 18:29:27 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.25 1998/11/27 19:52:03 vadim Exp $
*
*-------------------------------------------------------------------------
*/
@@ -342,11 +342,20 @@ ExecTee(Tee *node, Plan *parent)
slot = ExecProcNode(childNode, (Plan *) node);
if (!TupIsNull(slot))
{
- heapTuple = slot->val;
+ /*
+ * heap_insert changes something...
+ */
+ if (slot->ttc_buffer != InvalidBuffer)
+ heapTuple = heap_copytuple(slot->val);
+ else
+ heapTuple = slot->val;
/* insert into temporary relation */
heap_insert(bufferRel, heapTuple);
+ if (slot->ttc_buffer != InvalidBuffer)
+ pfree(heapTuple);
+
/*
* once there is data in the temporary relation, ensure that
* the left and right scandescs are initialized