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

From Gary Stainburn
Subject Re: URGENT!!! changing Column size
Date
Msg-id 200310271750.03143.gary.stainburn@ringways.co.uk
Whole thread Raw
In response to URGENT!!! changing Column size  (mohan@physics.gmu.edu)
List pgsql-sql
On Monday 27 Oct 2003 5:10 pm, mohan@physics.gmu.edu wrote:
> 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.
>
> --Mohan

try 

alter table institution add column newname varchar2(50);
update institution set newname = name;
alter table institution drop column namel;
alter table institution rename column newname to name;


>
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

-- 
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000     



pgsql-sql by date:

Previous
From: Tomasz Myrta
Date:
Subject: Re: URGENT!!! changing Column size
Next
From: Josh Berkus
Date:
Subject: Re: extend INSERT by 'INSERT INTO table FETCH ... FROM cursor' syntax