Re: Triggers for inserting on VIEWS

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: Marc SCHAEFER <schaefer(at)alphanet(dot)ch>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Triggers for inserting on VIEWS
Date: 2002-08-03 18:33:50
Message-ID: web-1599555@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Marc,

> at least with PostgreSQL 7.1 it was possible to create a trigger on a
> view. 7.2 seems to fail with:
>
> psql:t:25: ERROR: CreateTrigger: relation "egg_view" is not a
> table
>
> is there any replacement so that inserting somewhere acts on multiple
> tables ?

Yes. Use the RULES system, which were a lot like triggers but are
better tailored to deal with inserts and updates on VIEWs.
See:
http://www.us.postgresql.org/users-lounge/docs/7.2/postgres/rules.html

-Josh Berkus

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2002-08-03 18:34:44 Re: Triggers for inserting on VIEWS
Previous Message Joshua D. Drake 2002-08-03 18:32:20 Re: RES: The best book