Re: ALTER TRIGGER DISABLE/ENABLE - Mailing list pgsql-general

From Jean-Luc Lachance
Subject Re: ALTER TRIGGER DISABLE/ENABLE
Date
Msg-id 3DE63E3D.5BC92720@nsd.ca
Whole thread Raw
In response to Re: ALTER TRIGGER DISABLE/ENABLE  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
Sementics.

The trigger belongs to the table.
The trigger is not modified.
The ability of the table being modified to call it is modified.
Plus, if you want all the triggers on a table to be disabled the ALTER
TRIGGER is not enough.

JLL


Christoph Dalitz wrote:
>
> On Tue, 26 Nov 2002 14:41:47 -0500
> Jean-Luc Lachance <jllachan@nsd.ca> wrote:
> >
> > I think thte sintax should be:
> >
> > ALTER TABLE DISABLE|ENABLE TRIGGER {trigger name}|ALL
> >
> This would make no sense:
>
> It could be the syntax if the statement for creating a trigger
> where "ALTER TABLE ADD TRIGGER".
>
> The statement for creating a trigger is however "CREATE TRIGEER".
>
> Consequently the statement for changing a trigger must be "ALTER TRIGGER"
> and not "ALTER TABLE".
>
> Switching off all triggers for an individual table at once would be
> convenient of course and can be easily achieved with "ALTER TRIGGER" as well:
> just write a little PL/SQL procedure "disable_triggers()" that takes a
> tablename as input and disables all triggers on it.
>
> Christoph Dalitz

pgsql-general by date:

Previous
From: Jean-Luc Lachance
Date:
Subject: Re: Two features left
Next
From: Andrew Sullivan
Date:
Subject: Re: Enterprise readiness - mirroring / incremental backup solutions?