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

Поиск
Список
Период
Сортировка
От Emi Lu
Тема Re: Allow column type to change without worrying about view dependencies
Дата
Msg-id 4A1C0F49.5030307@encs.concordia.ca
обсуждение исходный текст
Ответ на Allow column type to change without worrying about view dependencies  (Emi Lu <emilu@encs.concordia.ca>)
Список 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


В списке pgsql-sql по дате отправления:

Предыдущее
От: John Dizaro
Дата:
Сообщение: Pgadmin hotkeys?
Следующее
От: Raphael Bauduin
Дата:
Сообщение: exists and is not null equivalence in query