Postgres Triggers instead of requiring a field - fire when field not included

Поиск
Список
Период
Сортировка
От Kevin Traster
Тема Postgres Triggers instead of requiring a field - fire when field not included
Дата
Msg-id BANLkTinSZF=+jpT-E+4VCtKd0Osy4_9ZMQ@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
Hello,

In Postgres 9.0, trying to prevent a recursive trigger by adding a column "notrigger".

Psuedo code: create trigger before_update_holdings_table BEFORE UPDATE ON holdings FOR EACH ROW when (new.notrigger is not given) EXECUTE PROCEDURE before_update_holdings();

I see in the docs, I can do the opposite - have it fire only when a field is included.

1) Is there any way to do the above, have a trigger fire when a field is not specifically included?
2) If not, what is the easiest way to prevent recursive triggers (in the update trigger, other update are done to the table and the trigger should be ignored).

Thanks,


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Error compiling sepgsql in PG9.1
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Values larger than 1/3 of a buffer page cannot be indexed (hstore)