Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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,



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux