Re: RELAX! - or more to the point, how do I temporarily relax a trigger/constraint?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: RELAX! - or more to the point, how do I temporarily relax a trigger/constraint?
Дата
Msg-id 24855.995567751@sss.pgh.pa.us
обсуждение исходный текст
Ответ на RELAX! - or more to the point, how do I temporarily relax a trigger/constraint?  ("Howard Williams" <howieshouse@home.com>)
Список pgsql-general
"Howard Williams" <howieshouse@home.com> writes:
> I need to programatically relax a constraint during db syncronization.  I
> tried setting tgenabled to false in the pg_trigger table, but it didn't seem
> to make a difference.

Hmm --- I see where trigger.c pays attention to tgenabled for BEFORE
triggers, but it seems to omit to check for AFTER triggers.  Given that
there's no feature anywhere in the system to set the field FALSE, I can
see how the oversight escaped notice :-(.

If you are talking about BEFORE triggers, another possible theory is
that your manual update isn't propagating to the relcache entry
where the triggers are stored.  If you start a new session (backend)
after making the change, does it honor the tgenabled setting?

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: many tables in db
Следующее
От: "Keith G. Murphy"
Дата:
Сообщение: Interesting discussion