diff options
| author | Tom Lane | 2008-01-02 23:34:42 +0000 |
|---|---|---|
| committer | Tom Lane | 2008-01-02 23:34:42 +0000 |
| commit | 20e862155f1000804f9e2ae20b7fbb9a55623951 (patch) | |
| tree | aa73bd2379ab9fa89abc9e3ba73e723934fc8b06 /src/include/commands/trigger.h | |
| parent | 69528aefbbf2c1bfb68b488fafd08bea390eb3f5 (diff) | |
Forbid ALTER TABLE and CLUSTER when there are pending AFTER-trigger events
in the current backend for the target table. These operations move tuples
around and would thus invalidate the TIDs stored in the trigger event records.
(We need not worry about events in other backends, since acquiring exclusive
lock should be enough to ensure there aren't any.) It might be sufficient
to forbid only the table-rewriting variants of ALTER TABLE, but in the absence
of any compelling use-case, let's just be safe and simple. Per follow-on
investigation of bug #3847, though this is not actually the same problem
reported therein.
Possibly this should be back-patched, but since the case has never been
reported from the field, I didn't bother.
Diffstat (limited to 'src/include/commands/trigger.h')
| -rw-r--r-- | src/include/commands/trigger.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/commands/trigger.h b/src/include/commands/trigger.h index f09e8d9387c..5e0dda4744d 100644 --- a/src/include/commands/trigger.h +++ b/src/include/commands/trigger.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/commands/trigger.h,v 1.65 2008/01/01 19:45:57 momjian Exp $ + * $PostgreSQL: pgsql/src/include/commands/trigger.h,v 1.66 2008/01/02 23:34:42 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -149,7 +149,7 @@ extern void AfterTriggerEndXact(bool isCommit); extern void AfterTriggerBeginSubXact(void); extern void AfterTriggerEndSubXact(bool isCommit); extern void AfterTriggerSetState(ConstraintsSetStmt *stmt); -extern void AfterTriggerCheckTruncate(List *relids); +extern bool AfterTriggerPendingOnRel(Oid relid); /* |
