Re: Quick way to alter a column type?

From: "Eric Bangug" <ericbangug(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Quick way to alter a column type?
Date: 2008-07-07 05:41:20
Message-ID: 59a954c20807062241w50987925k55af733db027e587@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> is there any quick hacks to do this quickly? There's around 20-30million
> rows of data.
>
> I want to change a column type from varchar(4) to varchar(5) or should I
> just use text instead.
>

ALTER TABLE tablename ALTER COLUMN columnname TYPE VARCHAR(5);

HTH.

-
Eric

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Frankel 2008-07-07 05:46:32 Re: roll back to 8.1 for PyQt driver work-around
Previous Message Ow Mun Heng 2008-07-07 03:44:21 Quick way to alter a column type?