Re: trigger self recursion

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: trigger self recursion
Дата
Msg-id 433A7AD7.9060702@archonet.com
обсуждение исходный текст
Ответ на trigger self recursion  ("Sim Zacks" <sim@compulab.co.il>)
Список pgsql-general
Sim Zacks wrote:
> Is there a way to avoid trigger self-recursion?
> In other words, update a table and have the trigger update another row in
> the same table without calling the same trigger?

No a per-row trigger will fire for every row updated.

There is presumably some test you can make to see whether your trigger
should do any work, or just exit. I have seen people on the list who
wrote the test in "C" and put the work in a separate function, but have
never needed that level of complexity myself.

--
   Richard Huxton
   Archonet Ltd

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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Triggers after a rule
Следующее
От: Sim Zacks
Дата:
Сообщение: Re: trigger self recursion