Re: Temporary Views

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hannu Krosing <hannu(at)tm(dot)ee>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Rod Taylor <rbt(at)zort(dot)ca>, Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Temporary Views
Date: 2002-08-13 19:30:48
Message-ID: 28894.1029267048@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hannu Krosing <hannu(at)tm(dot)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 dependent objects too
regression=#

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-08-13 19:34:59 Re: db partial dumping with pg_dump
Previous Message Rod Taylor 2002-08-13 19:10:09 Re: Temporary Views