Re: URGENT!!! changing Column size - Mailing list pgsql-sql

From CoL
Subject Re: URGENT!!! changing Column size
Date
Msg-id bnjlg9$1kv9$1@news.hub.org
Whole thread Raw
In response to URGENT!!! changing Column size  (mohan@physics.gmu.edu)
List pgsql-sql
Hi,

mohan@physics.gmu.edu wrote, On 10/27/2003 6:10 PM:

> Hi can we change the size of a column in postgres. I have a table named
> institution and column name is name varchar2(25), i want to change it to
> varchar2(50). Please let me know.

1 solution:

begin;
create temporary table temp as select * from mytable;
drop table mytable;
create table mytable (name varchar(50));
insert into mytable select CAST(name AS varchar(50)) from temp;
drop table temp;
commit;

C.



pgsql-sql by date:

Previous
From: Alexander Vlasenko
Date:
Subject: Re: extend INSERT by 'INSERT INTO table FETCH ... FROM cursor' syntax
Next
From: George Essig
Date:
Subject: Re: connectby