From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> |
Cc: | Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: enable/disable trigger (Re: Fwd: [HACKERS] Open items) |
Date: | 2005-07-03 04:19:28 |
Message-ID: | 200507030419.j634JS804983@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Gavin Sherry wrote:
> 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
The proposed syntax in TODO.detail/trigger is:
ALTER TABLE foo {DISABLE|ENABLE} TRIGGER { ALL | trigger_name [ ,... ] };
which would cleanly allow all triggers of a table to be disabled.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2005-07-03 05:21:26 | Roles - SET ROLE Updated |
Previous Message | Michael Glaesemann | 2005-07-03 02:45:22 | Re: [HACKERS] Dbsize backend integration |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2005-07-03 05:15:22 | Dependencies on shared objects |
Previous Message | Bruce Momjian | 2005-07-03 03:01:23 | Disable WAL backup pages when fsync is off |