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.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to