Re: Change view definition - do not have to drop it - Mailing list pgsql-general

From Emi Lu
Subject Re: Change view definition - do not have to drop it
Date
Msg-id 4A257F10.5010608@encs.concordia.ca
Whole thread Raw
In response to Re: Change view definition - do not have to drop it  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
>> 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.

Thank tom. Ok, I will not change view type, just keep bpchar for now.

Just a wish, if >=8.4 could allow change view type, that would be great!

--
Lu Ying




pgsql-general by date:

Previous
From: Ben Chobot
Date:
Subject: Re: Really out of memory?
Next
From: pribram pribram
Date:
Subject: lc_messages on 8.3.7