Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 295589FA601 for ; Sat, 21 Apr 2007 09:44:58 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 22226-09 for ; Sat, 21 Apr 2007 09:44:49 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mtai03.charter.net (mtai03.charter.net [209.225.8.183]) by postgresql.org (Postfix) with ESMTP id 743099FA273 for ; Sat, 21 Apr 2007 09:44:50 -0300 (ADT) Received: from aa08.charter.net ([10.20.200.160]) by mtai03.charter.net (InterMail vM.7.08.02.00 201-2186-121-20061213) with ESMTP id <20070421124445.IIVP1398.mtai03.charter.net@aa08.charter.net>; Sat, 21 Apr 2007 08:44:45 -0400 Received: from [10.0.1.3] (really [66.188.171.190]) by aa08.charter.net with ESMTP id <20070421124445.IKRY10109.aa08.charter.net@[10.0.1.3]>; Sat, 21 Apr 2007 08:44:45 -0400 In-Reply-To: <4629DBC8.4010700@7data.eu> References: <4629DBC8.4010700@7data.eu> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: pgsql-docs@postgresql.org Content-Transfer-Encoding: 7bit From: Michael Glaesemann Subject: Re: Improving CREATE CONSTRAINT TRIGGER documentation - trigger firing order Date: Sat, 21 Apr 2007 07:44:52 -0500 To: David Pufer X-Mailer: Apple Mail (2.752.2) X-Chzlrs: 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/20 X-Sequence-Number: 4216 On Apr 21, 2007, at 4:39 , David Pufer wrote: > In my opinion it would be nice to mention in SQL reference commands > that > constraint triggers created by CREATE CONSTRAINT TRIGGER are fired in > creation order unlike regular triggers created by command CREATE > TRIGGER. As I know, the firing order of the CONSTRAINT TRIGGER is > determined by the XXXXX num at "RI_ConstraintTrigger_XXXXX" column in > pg_trigger table. I believe this just falls out of the normal order of trigger firing as explained in the CREATE TRIGGER documentation (http:// www.postgresql.org/docs/8.2/interactive/sql-createtrigger.html) > If multiple triggers of the same kind are defined for the same > event, they will be fired in alphabetical order by name. It might be nice to add a similar phrase to the CREATE CONSTRAINT TRIGGER documentation, but as far as I know, the behavior is the same for triggers created by either method. The only difference is that constraint triggers are named by the system rather than by the user. Thoughts? Michael Glaesemann grzm seespotcode net