Re: how to modify a view - Mailing list pgsql-general

From J. Manuel Velasco - UBILIBET
Subject Re: how to modify a view
Date
Msg-id 4833D40A.5010804@ubilibet.com
Whole thread Raw
In response to Re: how to modify a view  (Shane Ambler <pgsql@Sheeky.Biz>)
List pgsql-general
Thank you Shane


All beings be happy,
·_- manou
Shane Ambler escribió:
J. Manuel Velasco - UBILIBET wrote:
Hello,

The DB I am using has views. I need to modify the view adding one
field to the QUERY that build the query.

When I edit the VIEW and add the field, I get the error that tells me
"It's not possible to change columns number in a view"

So, do I need to remove the complete VIEW and create a new one ? Or
there is other way to modify the view. ?¿

Thanks in advance, --

Yes - The only way to do it is DROP VIEW... then CREATE VIEW... - the
catch is any other views that depend on the view you wish to drop.


<manual quote>
You can only replace a view with a new query that generates the
identical set of columns (i.e., same column names and data types).
</manual quote>





--
Attachment

pgsql-general by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: best er modeling tool for postgreSQL
Next
From: Thomas Kellerer
Date:
Subject: XML2 module and xpath_table