Re: Firing Orders

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "CN" <cnliou9(at)fastmail(dot)fm>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Firing Orders
Date: 2002-11-28 15:14:56
Message-ID: 14073.1038496496@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"CN" <cnliou9(at)fastmail(dot)fm> writes:
> 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?

The RI_ triggers are AFTER triggers, so yes.

> 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?

Huh? They would not be fired at all, at least not as part of the same
trigger event.

> 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?

When it says "alphabetical order", it means exactly that. RI triggers
aren't special.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message PostgreSQL Public Relations 2002-11-28 15:16:01 PostgreSQL Global Development Group Announces Version 7.3
Previous Message Shridhar Daithankar 2002-11-28 15:10:16 Re: Why does everyone think MySQL is easier?