Re: Temporary Views - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Temporary Views
Date
Msg-id 28894.1029267048@sss.pgh.pa.us
Whole thread Raw
In response to Re: Temporary Views  (Hannu Krosing <hannu@tm.ee>)
List pgsql-hackers
Hannu Krosing <hannu@tm.ee> writes:
> We may have broken views again when "alter table drop column" gets done

It is done, and we do not have broken views.

regression=# create table t (f1 int, f2 int, f3 int);
CREATE TABLE
regression=# create view v as select f1,f2 from t;
CREATE VIEW
regression=# alter table t drop column f3;
ALTER TABLE
regression=# alter table t drop column f2;
NOTICE:  rule _RETURN on view v depends on table t column f2
NOTICE:  view v depends on rule _RETURN on view v
ERROR:  Cannot drop table t column f2 because other objects depend on it       Use DROP ... CASCADE to drop the
dependentobjects too
 
regression=#
        regards, tom lane


pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Temporary Views
Next
From: Hannu Krosing
Date:
Subject: Re: db partial dumping with pg_dump