From: Josh Berkus <josh@agliodbs.com>
To: Marc SCHAEFER <schaefer@alphanet.ch>
To: pgsql-sql@postgresql.org
Subject: Re: Triggers for inserting on VIEWS
Date: Sat, 03 Aug 2002 11:33:50 -0700
Message-ID: <web-1599555@davinci.ethosmedia.com> (raw)
In-Reply-To: <Pine.LNX.3.96.1020803193426.6029A-100000@defian.alphanet.ch>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com, schaefer@alphanet.ch
Subject: Re: Triggers for inserting on VIEWS
In-Reply-To: <web-1599555@davinci.ethosmedia.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox