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

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: enable/disable trigger (Re: Fwd: [HACKERS] Open items)
Дата
Msg-id 200507030419.j634JS804983@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: enable/disable trigger (Re: Fwd: [HACKERS] Open items)  (Gavin Sherry <swm@linuxworld.com.au>)
Список 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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

В списке pgsql-patches по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Disable WAL backup pages when fsync is off
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Dependencies on shared objects