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

Re: ALTER TABLE TODO items

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>,PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER TABLE TODO items
Date: 2004-05-05 16:52:15
Message-ID: 7488.1083775935@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
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.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2004-05-05 16:53:41
Subject: Re: ALTER TABLE TODO items
Previous:From: Rod TaylorDate: 2004-05-05 16:51:19
Subject: Re: PostgreSQL pre-fork speedup

pgsql-committers by date

Next:From: Bruce MomjianDate: 2004-05-05 16:53:41
Subject: Re: ALTER TABLE TODO items
Previous:From: Gaetano MendolaDate: 2004-05-05 16:38:31
Subject: Re: ALTER TABLE TODO items

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