Tom Lane wrote: > Bruce Momjian <pgman@candle.pha.pa.us> writes: > > Oh, and one trick for disabling triggers in a single session is to do > > this: > > > BEGIN WORK; > > ALTER TABLE xx DISABLE TRIGGER ALL > > ... > > ALTER TABLE xx ENABLE TRIGGER ALL > > COMMIT WORK; > > > In this case, the triggers are disabled just for that session. > > ... but everybody else is locked out completely, because the ALTER takes > an exclusive lock on the table. It's a bit misleading to describe that > as a local change.
Oh, I had not considered that. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings