Re: Alter field type?

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Alter field type?
Date: 2004-08-26 08:36:18
Message-ID: 877jrmqosd.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Bjørn T Johansen <btj(at)havleik(dot)no> writes:

> Is it possible to alter field type (from varchar to text) without making a new
> table?

You can add a new column, update the table to set the new column to the old
value. then drop the old column. Then you might want to vacuum full the table.

In 8.0 there will be a command to do what you want, but it will still have to
do all the same work as I described above.

--
greg

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michal Hlavac 2004-08-26 09:41:30 Stored procedure failure
Previous Message Tino Wildenhain 2004-08-26 08:31:48 Re: Alter field type?