INSERT INTO view means what exactly? - Mailing list pgsql-hackers

From Tom Lane
Subject INSERT INTO view means what exactly?
Date
Msg-id 2981.927643359@sss.pgh.pa.us
Whole thread Raw
Responses Re: [HACKERS] INSERT INTO view means what exactly?  (jwieck@debis.com (Jan Wieck))
Re: [HACKERS] INSERT INTO view means what exactly?  (Bruce Momjian <maillist@candle.pha.pa.us>)
List 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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Heads up: does RULES regress test still work for you?
Next
From: ZEUGSWETTER Andreas IZ5
Date:
Subject: create index updates nrows statistics