summaryrefslogtreecommitdiff
path: root/src/backend/commands/tablecmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r--src/backend/commands/tablecmds.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 7e8884496d0..45167b816af 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.201 2006/08/25 04:06:48 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.202 2006/09/04 21:15:55 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -612,6 +612,13 @@ ExecuteTruncate(TruncateStmt *stmt)
#endif
/*
+ * Also check for pending AFTER trigger events on the target relations.
+ * We can't just leave those be, since they will try to fetch tuples
+ * that the TRUNCATE removes.
+ */
+ AfterTriggerCheckTruncate(relids);
+
+ /*
* OK, truncate each table.
*/
foreach(cell, rels)