summaryrefslogtreecommitdiff
path: root/src/backend/tcop/pquery.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/tcop/pquery.c')
-rw-r--r--src/backend/tcop/pquery.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c
index e7f240e298f..a338006a3a5 100644
--- a/src/backend/tcop/pquery.c
+++ b/src/backend/tcop/pquery.c
@@ -182,11 +182,6 @@ ProcessQuery(PlannedStmt *plan,
dest, params, 0);
/*
- * Set up to collect AFTER triggers
- */
- AfterTriggerBeginQuery();
-
- /*
* Call ExecutorStart to prepare the plan for execution
*/
ExecutorStart(queryDesc, 0);
@@ -231,17 +226,15 @@ ProcessQuery(PlannedStmt *plan,
}
}
- /* Now take care of any queued AFTER triggers */
- AfterTriggerEndQuery(queryDesc->estate);
-
- PopActiveSnapshot();
-
/*
* Now, we close down all the scans and free allocated resources.
*/
+ ExecutorFinish(queryDesc);
ExecutorEnd(queryDesc);
FreeQueryDesc(queryDesc);
+
+ PopActiveSnapshot();
}
/*
@@ -531,13 +524,6 @@ PortalStart(Portal portal, ParamListInfo params, Snapshot snapshot)
0);
/*
- * We do *not* call AfterTriggerBeginQuery() here. We assume
- * that a SELECT cannot queue any triggers. It would be messy
- * to support triggers since the execution of the portal may
- * be interleaved with other queries.
- */
-
- /*
* If it's a scrollable cursor, executor needs to support
* REWIND and backwards scan.
*/