Port Bug Report: INSERT on VIEWs

From: Unprivileged user <nobody>
To: pgsql-ports(at)postgresql(dot)org
Subject: Port Bug Report: INSERT on VIEWs
Date: 1999-03-01 16:12:57
Message-ID: 199903011612.LAA23792@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports


============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================

Your name : Giuseppe Tanzilli
Your email address : g(dot)tanzilli(at)eurolink(dot)it

Category : runtime: back-end: SQL
Severity : non-critical

Summary: INSERT on VIEWs

System Configuration
--------------------
Operating System : Linux 2.2.3 glibc2 debian 2.1

PostgreSQL version : 6.4.2

Compiler used : gcc 2.7.2.3

Hardware:
---------
PII 256MB

Versions of other tools:
------------------------

--------------------------------------------------------------------------

Problem Description:
--------------------
INSERT is allowed over VIEWs, the row are not visible in the tables,
but in the tables file the row is present.

--------------------------------------------------------------------------

Test Case:
----------
CREATE TABLE t1 (i1 int4, i2 int4);
CREATE TABLE t2 (i3 int4, i4 int4);
INSERT INTO t1 (i1,i2) values(1, 1);
INSERT INTO t1 (i1,i2) values(2, 1);
INSERT INTO t1 (i1,i2) values(3, 1);
INSERT INTO t1 (i1,i2) values(4, 1);
INSERT INTO t1 (i1,i2) values(5, 1);
INSERT INTO t2 (i3,i4) values(1, 100);
INSERT INTO t2 (i3,i4) values(2, 100);
INSERT INTO t2 (i3,i4) values(3, 100);
INSERT INTO t2 (i3,i4) values(4, 100);
CREATE VIEW v1 as SELECT i1,i2,i4 from t1,t2 where i1=i3;
SELECT * from v1;
INSERT INTO v1 (i1,i2,i4) values (10,10,200);
SELECT * from v1;
SELECT * from t1;
SELECT * from t2;

DROP VIEW v1;
DROP TABLE t1;
DROP TABLE t2;

--------------------------------------------------------------------------

Solution:
---------

--------------------------------------------------------------------------

Browse pgsql-ports by date

  From Date Subject
Next Message Adriaan Joubert 1999-03-01 16:51:57 Re: [PORTS] FPE on Alpha in Select with PKEY
Previous Message Giuseppe Tanzilli 1999-03-01 15:20:31 Bug report