Re: Alter field type?

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Alter field type?
Дата
Msg-id 877jrmqosd.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Alter field type?  (Bjørn T Johansen <btj@havleik.no>)
Ответы Re: Alter field type?  (Markus Bertheau <mbertheau@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Tino Wildenhain
Дата:
Сообщение: Re: Alter field type?
Следующее
От: Michal Hlavac
Дата:
Сообщение: Stored procedure failure