Re: Allow column type to change without worrying about view dependencies

From: Emi Lu <emilu(at)encs(dot)concordia(dot)ca>
To: ulka salvi <ulka3005(at)gmail(dot)com>, PostgreSQL SQL List <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Allow column type to change without worrying about view dependencies
Date: 2009-05-26 15:48:25
Message-ID: 4A1C0F49.5030307@encs.concordia.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

ulka salvi wrote:
>>
>> u can try this
>> SELECT a,b,c,CAST(d AS float)
> AS N 'd',e,f,g INTO dbo.newtable
>
> Ulka

Did not follow.

Example,
create view v_test as select * from test1;
create table test(col1 varchar(12));

I'd like to:
alter table test alter column col1 type varchar(128);

Tried your suggested:
create or replace view v_test as select CAST( col1 as varchar(128)) from
test;

Got:
cannot change data type of view column "col1"

--
Lu Ying

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Raphael Bauduin 2009-05-28 12:36:31 exists and is not null equivalence in query
Previous Message John Dizaro 2009-05-25 16:21:24 Pgadmin hotkeys?