Define update-rule on view

From: patriq(at)gmx(dot)de (Patrick)
To: pgsql-general(at)postgresql(dot)org
Subject: Define update-rule on view
Date: 2001-11-05 11:06:29
Message-ID: 1df77666.0111050306.5a4b6657@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Aasmund Midttun Godal 2001-11-05 11:10:27 Re: Limitations on PGSQL
Previous Message Jean-Michel POURE 2001-11-05 10:33:48 Limitations on PGSQL