Re: Disabling Trigger

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Disabling Trigger
Дата
Msg-id 17347.1125376963@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Disabling Trigger  ("Prasad dev" <esteem3300@hotmail.com>)
Ответы Re: Disabling Trigger  ("Prasad dev" <esteem3300@hotmail.com>)
Список pgsql-novice
"Prasad dev" <esteem3300@hotmail.com> writes:
> Does any one know how disable a specific trigger i know the following way to
> disable trigger but it disables system generated default triggers too.

FWIW, PG 8.1 will have a supported command for that.

> I also tried the following
> UPDATE pg_trigger SET tgenabled = FALSE where tgname='trigger_name';
> But this too doesnt work.

That should work in recent releases, though you do have an issue of
whether backends will notice it right away.  A dummy update on the
pg_class row is the best way around that problem AFAIK.

What PG version are you using, and what exactly does "not work" mean?

            regards, tom lane

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

Предыдущее
От: "Lance Arlaus"
Дата:
Сообщение: Re: triggers: how to check if a field changed?
Следующее
От: " Jaromír Kamler"
Дата:
Сообщение: Fwd: Re: Fwd: Re: question - plpgsql and query on table given by variable