Re: Triggers for inserting on VIEWS - Mailing list pgsql-sql

From Josh Berkus
Subject Re: Triggers for inserting on VIEWS
Date
Msg-id web-1599555@davinci.ethosmedia.com
Whole thread Raw
In response to Triggers for inserting on VIEWS  (Marc SCHAEFER <schaefer@alphanet.ch>)
List 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


pgsql-sql by date:

Previous
From: Marc SCHAEFER
Date:
Subject: Triggers for inserting on VIEWS
Next
From: Tom Lane
Date:
Subject: Re: Triggers for inserting on VIEWS