Re: Trigger disactivation and SELECT WAITING
От | Tom Lane |
---|---|
Тема | Re: Trigger disactivation and SELECT WAITING |
Дата | |
Msg-id | 17066.1122400611@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Trigger disactivation and SELECT WAITING ("Philippe Lang" <philippe.lang@attiksystem.ch>) |
Список | pgsql-general |
"Philippe Lang" <philippe.lang@attiksystem.ch> writes: > I meant: in 7.4.X databases, is there a way of disabling a trigger without deleting it? I guess the answer is no. Nothing officially supported, anyway. There's a pg_trigger.tgenabled column but I'm not sure which operations pay attention to it. > That's what my plpgsql insert function does, and because of this, if a view is running at the same moment on the same tables(some views can take up to 2 hours to be calculated), the insert function gets stuck in a SELECT WAITING state. Soinsertions are impossible in the database when views are being calculated. I guess I question a database design in which you routinely have to drop triggers in order to get your work done. Why have the trigger at all if you do so many changes to the table with it deleted? Why not improve the trigger to be smart enough to not interfere with what you need the insertion function to do? regards, tom lane
В списке pgsql-general по дате отправления: