Re: Alter field type? - Mailing list pgsql-general

From Greg Stark
Subject Re: Alter field type?
Date
Msg-id 877jrmqosd.fsf@stark.xeocode.com
Whole thread Raw
In response to Alter field type?  (Bjørn T Johansen <btj@havleik.no>)
Responses Re: Alter field type?
List pgsql-general
Bjørn T Johansen <btj@havleik.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

pgsql-general by date:

Previous
From: Tino Wildenhain
Date:
Subject: Re: Alter field type?
Next
From: Michal Hlavac
Date:
Subject: Stored procedure failure