diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index b7e1a175b53d93df81fba0ba990e896a6ad0c237..cfaa3927bc7b1240b933ef166fd1a94336f67665 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/copy.c,v 1.321 2010/01/15 09:19:01 heikki Exp $ + * $PostgreSQL: pgsql/src/backend/commands/copy.c,v 1.322 2010/01/31 18:15:39 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -2172,6 +2172,8 @@ CopyFrom(CopyState cstate) ExecARInsertTriggers(estate, resultRelInfo, tuple, recheckIndexes); + list_free(recheckIndexes); + /* * We count only tuples not suppressed by a BEFORE INSERT trigger; * this is the same definition used by execMain.c for counting diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c index 170dda313733183990442121e707d29560a31dbb..cad08fa8f72debbf0e82ed95de83cd778a79637a 100644 --- a/src/backend/executor/nodeModifyTable.c +++ b/src/backend/executor/nodeModifyTable.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/nodeModifyTable.c,v 1.4 2010/01/02 16:57:44 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/executor/nodeModifyTable.c,v 1.5 2010/01/31 18:15:39 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -254,6 +254,8 @@ ExecInsert(TupleTableSlot *slot, /* AFTER ROW INSERT Triggers */ ExecARInsertTriggers(estate, resultRelInfo, tuple, recheckIndexes); + list_free(recheckIndexes); + /* Process RETURNING if present */ if (resultRelInfo->ri_projectReturning) return ExecProcessReturning(resultRelInfo->ri_projectReturning, @@ -570,6 +572,8 @@ lreplace:; ExecARUpdateTriggers(estate, resultRelInfo, tupleid, tuple, recheckIndexes); + list_free(recheckIndexes); + /* Process RETURNING if present */ if (resultRelInfo->ri_projectReturning) return ExecProcessReturning(resultRelInfo->ri_projectReturning,