Re: URGENT!!! changing Column size

From: Tomasz Myrta <jasiek(at)klaster(dot)net>
To: mohan(at)physics(dot)gmu(dot)edu
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: URGENT!!! changing Column size
Date: 2003-10-27 17:46:36
Message-ID: 3F9D59FC.8010407@klaster.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Dnia 2003-10-27 18:10, Użytkownik mohan(at)physics(dot)gmu(dot)edu napisał:
> 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.

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

(or something like this)

Regards,
Tomasz Myrta

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message CoL 2003-10-27 17:48:30 Re: URGENT!!! changing Column size
Previous Message mohan 2003-10-27 17:10:31 URGENT!!! changing Column size