INSERT INTO view means what exactly?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: INSERT INTO view means what exactly?
Date: 1999-05-25 14:42:39
Message-ID: 2981.927643359@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

With current sources:

regression=> CREATE TABLE x (y text);
CREATE
regression=> CREATE VIEW z AS select * from x;
CREATE
regression=> INSERT INTO x VALUES ('foo');
INSERT 411635 1
regression=> INSERT INTO z VALUES ('bar');
INSERT 411636 1
regression=> select * from x;
y
---
foo
(1 row)

regression=> select * from z;
y
---
foo
(1 row)

OK, where'd tuple 411636 go? Seems to me that the insert should either
have been rejected or caused an insert into x, depending on how
transparent you think views are (I always thought they were
read-only?). Dropping the data into never-never land and giving a
misleading success response code is not my idea of proper behavior.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message ZEUGSWETTER Andreas IZ5 1999-05-25 15:04:17 create index updates nrows statistics
Previous Message Tom Lane 1999-05-25 14:37:57 Re: [HACKERS] Heads up: does RULES regress test still work for you?