Commit 7fc75517 authored by Jan Wieck's avatar Jan Wieck

Fixed growing of backend due to not pfree()'d data on COPY FROM

Fixed growing of backend if BEFORE DELETE trigger returns heap tuple
different from trigtuple.

Jan
parent 072be472
......@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.68 1999/01/23 22:27:26 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.69 1999/02/01 20:25:54 wieck Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -651,7 +651,6 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
lineno = 0;
while (!done)
{
values = (Datum *) palloc(sizeof(Datum) * attr_count);
if (!binary)
{
#ifdef COPY_PATCH
......
......@@ -684,6 +684,8 @@ ExecBRDeleteTriggers(EState *estate, ItemPointer tupleid)
newtuple = ExecCallTriggerFunc(trigger[i]);
if (newtuple == NULL)
break;
if (newtuple != trigtuple)
pfree(newtuple);
}
CurrentTriggerData = NULL;
pfree(SaveTriggerData);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment