framework to keep track of snapshots in use.
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
{
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)