Define update-rule on view - Mailing list pgsql-general

From patriq@gmx.de (Patrick)
Subject Define update-rule on view
Date
Msg-id 1df77666.0111050306.5a4b6657@posting.google.com
Whole thread Raw
Responses Re: Define update-rule on view  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi there,
i got a table

xxtestobject(test_id serial,
       test_name varchar(254),
       test_active bool)

then i created a view

xxtest with
select * from xxtestobject where test_active=true;

i created a working rule for insert on the view.
now i want to implement a rule for an update.
the task is, that an update doesnt "update" the selected entry, it got
to set test_active to false, and insert a new row with the new data
and test_active settet to true.

i tried all the last view nights and now i'm not able to think any
more...

any ideas left ?

so many thanks in advance
Patrick

pgsql-general by date:

Previous
From: "K. Ari Krupnikov"
Date:
Subject: EXCEPT performace
Next
From: angelflow@yahoo.com (Andy)
Date:
Subject: Porting Web application written in Oracle 8 PL/SQL to Postgresql