Search Postgresql Archives

Re: Change view definition - do not have to drop it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Emi Lu <emilu@xxxxxxxxxxxxxxxxx> writes:
> Now I need update view1 definition to
> create or replace view view1 as select col1, col2 from new_table;

> However, col1 in new_table is not bpchar. This gives me headache! There 
> are tens of dependent views based on view1, so I cannot just drop view1 
> and recreate it.

> How I can redefine view1 without dropping it and recreate it?

Cast the new column to bpchar?

If you want to change the output column type of the view, you have to
drop and recreate it.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux