Re: trigger without trigger call

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: trigger without trigger call
Дата
Msg-id CAFj8pRDbu+M=WnRn25L8FH-UtSCAcQP+UQmrqqd5ZC30NhGBYg@mail.gmail.com
обсуждение исходный текст
Ответ на trigger without trigger call  (Philipp Kraus <philipp.kraus@tu-clausthal.de>)
Список 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 по дате отправления:

Предыдущее
От: Philipp Kraus
Дата:
Сообщение: trigger without trigger call
Следующее
От: Jesse Long
Дата:
Сообщение: Re: Incorrect index being used