Re: Disable Triggers

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: Disable Triggers
Дата
Msg-id 20080221172022.GC18657@crankycanuck.ca
обсуждение исходный текст
Ответ на Re: Disable Triggers  (Terry Lee Tucker <terry@chosen-ones.org>)
Ответы Re: Disable Triggers
Re: Disable Triggers
Список pgsql-general
On Thu, Feb 21, 2008 at 11:44:25AM -0500, Terry Lee Tucker wrote:

> table where, when the given trigger does fire, it checks for an entry in the
> table at the top of the trigger and takes the appropiate action. The problem
> is that the solution for disabling all triggers is used in several utility
> programs and I'm trying to avoid changing a bunch of code.
> I appreciate your input.

Well, you could try rewriting the function to disable all but the Slony
trigger.  But there's something else wrong here.

I seem to recall that we found some code path where reltriggers wasn't
checked properly anyway, so disabling triggers wouldn't work exactly as you
are doing it.  This was part of the reason for the catalogue-breaking oid
fiddling Slony does on replicated tables, IIRC.  So I'm not even sure your
current approach will work reliably as you think.

Probably the right answer, I'm afraid, is to change your trigger functions
to fire more selectively, then make the disable trigger function a no-op (so
you don't have to change all your other code right now).


A


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: No pgxs.mk with win32 binaries
Следующее
От: Terry Lee Tucker
Дата:
Сообщение: Re: Disable Triggers