Re: triggers and inheritance tree

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: triggers and inheritance tree
Date: 2012-03-28 15:03:40
Message-ID: CA+TgmobkW5YE4CarbP5T+-wFPKO-xLk798a7iKZsa03teddJhw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 28, 2012 at 10:46 AM, Jaime Casanova <jaime(at)2ndquadrant(dot)com> wrote:
> On Wed, Mar 28, 2012 at 8:29 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> I think the problem is that the UPDATE or DELETE can only fire once a
>> matching row has been identified, so that OLD can be filled in
>> appropriately.  But in this case, the matching row gets found not in
>> the parent table, but in one of its child tables.  So any triggers on
>> the child table would fire, but triggers on the parent table will not.
>
> ah! and of course that makes a lot of sense...
> how embarrasing! :(

If it's any consolation, when I initially looked at your example, I
couldn't see what was wrong with it, either. After I ran it I figured
it out. :-)

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-03-28 15:06:01 Re: Re: pg_stat_statements normalisation without invasive changes to the parser (was: Next steps on pg_stat_statements normalisation)
Previous Message Robert Haas 2012-03-28 15:01:36 Re: Finer Extension dependencies