pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Emi Lu <emilu@encs.concordia.ca>
To: ulka salvi <ulka3005@gmail.com>
To: PostgreSQL SQL List <pgsql-sql@postgresql.org>
Subject: Re: Allow column type to change without worrying about view dependencies
Date: Tue, 26 May 2009 11:48:25 -0400
Message-ID: <4A1C0F49.5030307@encs.concordia.ca> (raw)
In-Reply-To: <e81014000905260236q798cf3d0v886eeae8a3d4c117@mail.gmail.com>
References: <4A16BCCD.1020508@encs.concordia.ca>
	<e81014000905260236q798cf3d0v886eeae8a3d4c117@mail.gmail.com>

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



view thread (2+ messages)

Message-ID: <4A1C0F49.5030307@encs.concordia.ca>
Permalink:  ../4A1C0F49.5030307@encs.concordia.ca/
Also on:    postgresql.org/message-id/4A1C0F49.5030307@encs.concordia.ca

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: emilu@encs.concordia.ca, ulka3005@gmail.com
  Subject: Re: Allow column type to change without worrying about view dependencies
  In-Reply-To: <4A1C0F49.5030307@encs.concordia.ca>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox