Re: Alter View foo?

Lists: pgsql-novice
From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Alter View foo?
Date: 2006-03-17 01:45:56
Message-ID: 20060317014556.26415.qmail@web31812.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-novice

I am trying to add additional columns to an existing view. The ALTER statement doesn't appear to
operate on views. Is there a way to alter the definition of a view without dropping and recreating
it?

Regards,

Richard


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Alter View foo?
Date: 2006-03-17 05:40:15
Message-ID: 25424.1142574015@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-novice

Richard Broersma Jr <rabroersma(at)yahoo(dot)com> writes:
> Is there a way to alter the definition of a view without dropping and
> recreating it?

You can replace a view with a different computation of the same output
columns, but you can't change the set of output columns. I'm not sure
why we still enforce that, given that regular tables can be changed more
flexibly ...

regards, tom lane