Search Postgresql Archives

Re: trigger without trigger call

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

 



Hello

you can disable trigger by ALTER TABLE tablename DISABLE TRIGGER triggername;

but it should be executed with owner rights on table.

This statement works perfect, but a fact, so you need it signalize so you do some wrong. Triggers should to be used primary for checking, logging, calculating some simply calculated values. Anything else is can carry some very negative effects with impacts on readability or performance (although sometimes it is necessary). Try to move some logic from triggers to functions with explicit call.

Regards

Pavel Stehule


2013/10/14 Philipp Kraus <philipp.kraus@xxxxxxxxxxxxxxx>
Hello,

I have written a update & delete trigger of a table.
My delete trigger runs an update statement but this create a (semantic) problem.
How can I disable the update trigger for only this update call within the delete trigger?
So my delete trigger need not call the update trigger

Thanks

Phil



--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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