Updating views

From: Rasmus Resen Amossen <spunk(at)rhk(dot)dk>
To: pgsql-general(at)postgresql(dot)org
Subject: Updating views
Date: 2001-06-04 21:12:56
Message-ID: 3B1BF9D7.2957B925@rhk.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

If I add a "where" clause on my views, I can't insert or update them
anymore. Why?

Example:
CREATE TABLE temp (a int);
CREATE VIEW tview AS SELECT a FROM temp WHERE a>10;

INSERT INTO tview VALUES (13);
ERROR: Cannot update a view without an appropriate rule

What is the appropriate rule?

--
Rasmus Resen Amossen | stud.mat.dat at the University of Copenhagen
Jagtvej 120, -244 | http://www.math.ku.dk/muh
2200 Kbh. N | http://w1.1444.telia.com/~u144400001

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2001-06-04 21:22:29 FYI: status of native language support
Previous Message Rasmus Resen Amossen 2001-06-04 20:48:47 subselects in check clauses