From 6beba218d7f6f764e946751df6dc0d0180da05fa Mon Sep 17 00:00:00 2001 From: "Vadim B. Mikheev" Date: Fri, 27 Nov 1998 19:52:36 +0000 Subject: New HeapTuple structure/interface. --- src/backend/executor/nodeTee.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/backend/executor/nodeTee.c') diff --git a/src/backend/executor/nodeTee.c b/src/backend/executor/nodeTee.c index 623a43b9e0..7b0f7f1755 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 -- cgit v1.2.1