Firing Orders

Поиск
Список
Период
Сортировка
От CN
Тема Firing Orders
Дата
Msg-id 20021128121843.C52B73AF1D@server2.fastmail.fm
обсуждение исходный текст
Ответы Re: Firing Orders  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Firing Orders  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-general
Hi!

The document reads:

"If more than one trigger is defined for the same event on the same
relation, the triggers will be fired in alphabetical order by name."

Q1. Are BEFORE UPDATE and BEFORE DELETE (let's call them as "customed")
triggers always fired before RI_ConstraintTriggers on the same relation
regardless of the alphabetical name of these customed triggers?

Q2. Are BEFORE UPDATE and BEFORE DELETE (customed) triggers on the
referenced relation fired before the RI_ConstraintTriggers on the
referencing relation regardless of the alphabetical name of these
customed triggers?

Q3. Are AFTER UPDATE and AFTER DELETE (customed) triggers fired after
RI_ConstraintTriggers on the same relation regardless of the alphabetical
name of these customed triggers?

Q4. Are AFTER UPDATE and AFTER DELETE (customed) triggers on the
referenced relation fired after the RI_constraintTriggers on the
referencing relation regardless of the alphabetical name of these
customed triggers?

It might be a good idea to add matrix tables with explaining

(1) triggers' firing orders when BEFORE and AFTER are involved like the
aformentioned questions
(2) UPDATE and DELETE order between the referenced (master) and the
referencing (detail) tables when RI constraints are enforced between the
two

to programmer's manual as I feel programmers may fail to maintain their
data in integrity if they lose the control over these "orders".

Regards,

CN
--
http://fastmail.fm - The way an email service should be

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

Предыдущее
От: Christoph Dalitz
Дата:
Сообщение: Re: German character set
Следующее
От: Jean-Christian Imbeault
Дата:
Сообщение: Re: Whereis the pltcl.so file for postgres7.2.3??