Re: Multiple triggers/rules

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Multiple triggers/rules
Дата
Msg-id 10216.982768645@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Multiple triggers/rules  (brichard@cafod.org.uk (Bruce Richardson))
Ответы Re: Multiple triggers/rules  (brichard@cafod.org.uk (Bruce Richardson))
Список pgsql-general
brichard@cafod.org.uk (Bruce Richardson) writes:
> How would I check the order triggers will be run in, where a
> column/table has multiple triggers on it?  Is there a way to change that
> order?

It's essentially random, and you can't control or change it.  If you
have interdependent actions in different triggers, you'll probably have
to combine those triggers so that you can know the ordering of the
actions.  If the triggers are independent, though, there's no reason
to care what order they fire in.

> And while I'm at it, can you define more than one rule for the same
> event on the one table?

Yes, with the same ordering issues as for triggers.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: "Neil Burrows"
Дата:
Сообщение: Inheritance Question
Следующее
От: "Gregory Wood"
Дата:
Сообщение: Deferred NOT NULL?