Re: trigger inheritence?
От | Stephan Szabo |
---|---|
Тема | Re: trigger inheritence? |
Дата | |
Msg-id | Pine.BSF.4.21.0103201418401.30805-100000@megazone23.bigpanda.com обсуждение исходный текст |
Ответ на | trigger inheritence? ("Matt Magoffin" <mmagoffin@proxicom.com>) |
Список | 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 по дате отправления: