Re: Altering columns without losing data

Поиск
Список
Период
Сортировка
От AarniRuuhimäki / Megative Tmi / KYMI.com
Тема Re: Altering columns without losing data
Дата
Msg-id 20020510175710.TSMW29389.fep08.tmt.tele.fi@there
обсуждение исходный текст
Ответ на Altering columns without losing data  ("G" <gerard@interfold.com>)
Список pgsql-novice
Hi !

Not sure if this is the right way, but I've done this succesfully by dumping
(pg_dump -c) the db, then drop the db, edit the dump file's CREATE TABLE
commands to change datatype or length, then restore the db with the dump.

Be careful and make sure you have the dump file somewhere safe.

BR,

aarni


On Thursday 09 May 2002 09:11 pm, you wrote:
> Hello,
>
> Is there a way to change a column's data type without removing and adding
> it (and losing data)? Such as changing the text length for a column.
>
> Thanks,
> Gerard
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)


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

Предыдущее
От: Andrew McMillan
Дата:
Сообщение: Re: Time Formatting
Следующее
От: hodges@xprt.net
Дата:
Сообщение: Re: Time Formatting