Skip site navigation (1) Skip section navigation (2)

Re: Order of update triggers

From: Rob Richardson <RDRichardson(at)rad-con(dot)com>
To: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Order of update triggers
Date: 2012-01-27 17:45:41
Message-ID: 67D108EDFAD3C148A593E6ED7DCB4BBDFA355F@RADCONWIN2K8PDC.radcon.local (view raw or flat)
Thread:
Lists: pgsql-novice
I have confirmed that in my case, the delete trigger is happening before the update trigger, presumably because it is happening in alphabetic order as was stated earlier.  But since the data being used by the update trigger comes from the 'new' object instead of from the current contents of the table, it does not matter that the underlying record may have already been deleted.  (Of course, all triggers are fired within a single transaction, and inside a transaction, terms like "before", "after" and "already" are effectively meaningless.  Right?)

RobR


In response to

Responses

pgsql-novice by date

Next:From: AngusDate: 2012-01-27 18:41:27
Subject: Install & Launch PgAdmin on CentOS 6.2 with PostgreSQL 8.4.9
Previous:From: Jean-Yves F. BarbierDate: 2012-01-27 17:16:22
Subject: Re: Order of update triggers

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group