Re: trigger inheritence? - Mailing list pgsql-general

From Stephan Szabo
Subject Re: trigger inheritence?
Date
Msg-id Pine.BSF.4.21.0103201418401.30805-100000@megazone23.bigpanda.com
Whole thread Raw
In response to trigger inheritence?  ("Matt Magoffin" <mmagoffin@proxicom.com>)
List pgsql-general
On Tue, 20 Mar 2001, Matt Magoffin wrote:

> I had to give a loud "Duh!" after reading your response: that's exactly what
> I wanted, thanks!
>
> Now I wonder if there is a way for a trigger that's created on a base table
> to be fired on any table that inherits from that base table. Otherwise I'm
> still stuck creating triggers for each table that I create (that's inherited
> from the base table).
>
> For example, if I have:
>
> CREATE TABLE foo (
>     "name" text
> );
>
> CREATE TRIGGER foo_trigger BEFORE INSERT
> ON foo FOR EACH ROW EXECUTE PROCEDURE a_func();
>
> CREATE TABLE bar (
> ) INHERITS (foo);
>
> I would like foo_trigger to get fired when I execute a
>
> INSERT into bar ("Hello, world.");
>
> but it only seems to fire if the INSERT was on foo, not bar. Any way to do
> this?

Not automatically currently. :(
It's in the general to do, but...



pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: RE: finding and removing a constraint...
Next
From: Matthew
Date:
Subject: RE: Real 7.1