postgresql/src/backend/commands
Tom Lane 20e862155f 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.
2008-01-02 23:34:42 +00:00
..
aggregatecmds.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
alter.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
analyze.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
async.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
cluster.c Forbid ALTER TABLE and CLUSTER when there are pending AFTER-trigger events 2008-01-02 23:34:42 +00:00
comment.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
conversioncmds.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
copy.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
dbcommands.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
define.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
discard.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
explain.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
functioncmds.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
indexcmds.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
lockcmds.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
Makefile Tsearch2 functionality migrates to core. The bulk of this work is by 2007-08-21 01:11:32 +00:00
opclasscmds.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
operatorcmds.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
portalcmds.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
prepare.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
proclang.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
schemacmds.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
sequence.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
tablecmds.c Forbid ALTER TABLE and CLUSTER when there are pending AFTER-trigger events 2008-01-02 23:34:42 +00:00
tablespace.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
trigger.c Forbid ALTER TABLE and CLUSTER when there are pending AFTER-trigger events 2008-01-02 23:34:42 +00:00
tsearchcmds.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
typecmds.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
user.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
vacuum.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
vacuumlazy.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
variable.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
view.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00