*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/portalcmds.c,v 1.69 2008/01/01 19:45:49 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/portalcmds.c,v 1.70 2008/03/20 20:05:56 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
CurrentResourceOwner = portal->resowner;
/* we do not need AfterTriggerEndQuery() here */
ExecutorEnd(queryDesc);
+ FreeQueryDesc(queryDesc);
}
PG_CATCH();
{
portal->queryDesc = NULL; /* prevent double shutdown */
/* we do not need AfterTriggerEndQuery() here */
ExecutorEnd(queryDesc);
+ FreeQueryDesc(queryDesc);
/*
* Set the position in the result set: ideally, this could be
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.188 2008/02/12 04:09:44 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.189 2008/03/20 20:05:56 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
{
Node *stmt = (Node *) lfirst(lc2);
bool canSetTag;
- QueryDesc *qdesc;
DestReceiver *dest;
_SPI_current->processed = 0;
if (IsA(stmt, PlannedStmt) &&
((PlannedStmt *) stmt)->utilityStmt == NULL)
{
+ QueryDesc *qdesc;
+
qdesc = CreateQueryDesc((PlannedStmt *) stmt,
ActiveSnapshot,
crosscheck_snapshot,
AfterTriggerEndQuery(queryDesc->estate);
ExecutorEnd(queryDesc);
+ /* FreeQueryDesc is done by the caller */
#ifdef SPI_EXECUTOR_STATS
if (ShowExecutorStats)