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

From: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
To: Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: enable/disable trigger (Re: Fwd: [HACKERS] Open items)
Date: 2005-07-01 10:06:37
Message-ID: Pine.LNX.4.58.0507012003210.32297@linuxworld.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Fri, 1 Jul 2005, Satoshi Nagayasu wrote:

> Hi all,
>
> Here is a first patch to allow these commands.
>
> > ALTER TABLE <table> ENABLE TRIGGER <trigname>
> > ALTER TABLE <table> DISABLE TRIGGER <trigname>
>

Hmmm.. just thinking about it for a second. I wonder if we should also
support:

ALTER TABLE DISABLE TRIGGERS

which would disable all triggers on the table. We would have a
complimentary ENABLE TRIGGERS as well, obviously. The reason I say this is
that the common case will be that people are doing a bulk load and want to
disable all triggers. However, this will be very useful for debugging
interactions between triggers on a table so a user might want to disable
only one of many triggers -- as your current grammar does.

Perhaps a way of making the grammar a little less ambiguous would be to
have the following to disable all triggers:

ALTER TABLE <table> DISABLE TRIGGERS

and the following to disable one:

ALTER TRIGGER <trigger> DISABLE

Just an idea.

Thanks,

Gavin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Oliver Jowett 2005-07-01 10:13:03 Re: 2PC transaction id
Previous Message Gavin Sherry 2005-07-01 09:59:26 Re: enable/disable trigger (Re: Fwd: [HACKERS] Open items)

Browse pgsql-patches by date

  From Date Subject
Next Message Oliver Jowett 2005-07-01 10:13:03 Re: 2PC transaction id
Previous Message Gavin Sherry 2005-07-01 09:59:26 Re: enable/disable trigger (Re: Fwd: [HACKERS] Open items)