Postgres Triggers instead of requiring a field - fire when field not included - Mailing list pgsql-general

From Kevin Traster
Subject Postgres Triggers instead of requiring a field - fire when field not included
Date
Msg-id BANLkTinSZF=+jpT-E+4VCtKd0Osy4_9ZMQ@mail.gmail.com
Whole thread Raw
List 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 by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] Error compiling sepgsql in PG9.1
Next
From: Tom Lane
Date:
Subject: Re: Values larger than 1/3 of a buffer page cannot be indexed (hstore)