Re: Changing the number and type of columns in a view - Mailing list pgsql-general

From Richard Huxton
Subject Re: Changing the number and type of columns in a view
Date
Msg-id 45531A60.7020604@archonet.com
Whole thread Raw
In response to Changing the number and type of columns in a view  (Russell Smith <mr-russ@pws.com.au>)
List pgsql-general
Russell Smith wrote:
> Hi General,
>
> Is there a reason why it is not possible to redefine a view with a
> different number of columns or a different column type?
> It's been possible to change the datatypes of a table, and the column
> numbers for a long time.  What are the restrictions on making this
> possible for views.
>
> I know you can drop an recreate the view, but if the view has dependent
> objects it becomes more difficult.

That's why - the dependent objects might have to change with it.

I suppose it should be possible to add columns to a view without causing
too many problems. Or change a column-definition provided it isn't
referenced anywhere.

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: "Thomas H."
Date:
Subject: Re: planer picks a bad plan (seq-scan instead of index)
Next
From: "Sandeep Kumar Jakkaraju"
Date:
Subject: Too many open cursors