Skip site navigation (1) Skip section navigation (2)

Re: ALTER TABLE TODO items

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>,PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER TABLE TODO items
Date: 2004-05-05 16:53:41
Message-ID: 200405051653.i45Grfv15873@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
Tom Lane wrote:
> Stephen Frost <sfrost(at)snowman(dot)net> writes:
> > Does using table recreate break views built against the table?
> 
> Right now it just rejects the ALTER attempt:
> 
> regression=# create table t1 (f1 int);
> CREATE TABLE
> regression=# create view v1 as select * from t1;
> CREATE VIEW
> regression=# alter table t1 alter f1 type bigint;
> ERROR:  cannot alter type of a column used by a view or rule
> DETAIL:  rule _RETURN on view v1 depends on column "f1"
> regression=#
> 
> Improving this per the previous discussion probably ought to be
> mentioned in the TODO list.

Add to TODO?

	Allow views to be auto-recreated based on table changes

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-hackers by date

Next:From: Bruno Wolff IIIDate: 2004-05-05 16:55:11
Subject: Re: COPY command - CSV files
Previous:From: Tom LaneDate: 2004-05-05 16:52:15
Subject: Re: ALTER TABLE TODO items

pgsql-committers by date

Next:From: Robert TreatDate: 2004-05-05 17:04:31
Subject: Re: ALTER TABLE TODO items
Previous:From: Tom LaneDate: 2004-05-05 16:52:15
Subject: Re: ALTER TABLE TODO items

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group