Re: [PATCHES] enable/disable trigger (Re: Fwd: [HACKERS] Open items)

2005-08-15 Thread Tom Lane
Bruce Momjian writes: > Tom Lane wrote: >> ... 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. > The pre-8.1 method was to UPDATE pg_class.reltriggers = 0. Would that > allow con

Re: [PATCHES] enable/disable trigger (Re: Fwd: [HACKERS] Open items)

2005-08-15 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian 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

Re: [PATCHES] enable/disable trigger (Re: Fwd: [HACKERS] Open items)

2005-08-15 Thread Tom Lane
Bruce Momjian 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

Re: [PATCHES] enable/disable trigger (Re: Fwd: [HACKERS] Open items)

2005-08-15 Thread Bruce Momjian
Satoshi Nagayasu wrote: > Bruce Momjian wrote: > > I am not sure what to do with this patch. It is missing dump > > capability, there is no clause to disable all triggers on a table, and > > it uses a table owner check when a super user check is required (because > > of referential integrity). > >