Re: varchat ->text

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: varchat ->text
Дата
Msg-id 3AADD149.9C04422B@archonet.com
обсуждение исходный текст
Ответ на varchat ->text  (Aristide Aragon <aristide@lionking.org>)
Список pgsql-general
Aristide Aragon wrote:
>
[snip]
> I need, then, to convert my tables from varchar to text, but I don't find a way to do it. ALTER TABLE table ALTER
columnseems to only be able to modify the default value, not the data type. I also don't see an ALTER TABLE DROP
COLUMN,so that I could drop the varchar column and then add a text one. 
> Is there a way to do what I need without having to drop all the tables?
>
Quickest way is to use pg_dump with the table definitions (-s iirc) then
use your favourite text editor to do a bit of search & replace then re-import.

- Richard Huxton

В списке pgsql-general по дате отправления:

Предыдущее
От: Alex Howansky
Дата:
Сообщение: "critical mass" reached?
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Re: Anyone can create tables!