Re: trigger without trigger call - Mailing list pgsql-general

From Pavel Stehule
Subject Re: trigger without trigger call
Date
Msg-id CAFj8pRDbu+M=WnRn25L8FH-UtSCAcQP+UQmrqqd5ZC30NhGBYg@mail.gmail.com
Whole thread Raw
In response to trigger without trigger call  (Philipp Kraus <philipp.kraus@tu-clausthal.de>)
List pgsql-general
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@tu-clausthal.de>
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@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Philipp Kraus
Date:
Subject: trigger without trigger call
Next
From: Jesse Long
Date:
Subject: Re: Incorrect index being used