Re: How to avoid Trigger ping/pong / infinite loop

Поиск
Список
Период
Сортировка
От David Wheeler
Тема Re: How to avoid Trigger ping/pong / infinite loop
Дата
Msg-id 87FC4042-E7F1-4A53-AE60-1C84B5276713@gmail.com
обсуждение исходный текст
Ответ на Re: How to avoid Trigger ping/pong / infinite loop  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general

Are there techniques for situations like this?

Just have two triggers, one for each column, and ensure that if your trigger doesn’t change the value then it doesn’t do an update on the other column. Each time you do update both triggers will run but only one will make a change, so that will break the cycle

For insert case ensure the triggers do nothing if their source col is null

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Automatic aggressive vacuum on almost frozen table takes too long
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: DELETE trigger, direct or indirect?