Re: trigger inheritence?

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Matt Magoffin <mmagoffin(at)proxicom(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: trigger inheritence?
Date: 2001-03-20 22:19:16
Message-ID: Pine.BSF.4.21.0103201418401.30805-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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...

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Matthew 2001-03-20 22:20:15 RE: Real 7.1
Previous Message Stephan Szabo 2001-03-20 22:18:23 Re: RE: finding and removing a constraint...