Re: Altering columns without losing data - Mailing list pgsql-novice

From AarniRuuhimäki / Megative Tmi / KYMI.com
Subject Re: Altering columns without losing data
Date
Msg-id 20020510175710.TSMW29389.fep08.tmt.tele.fi@there
Whole thread Raw
In response to Altering columns without losing data  ("G" <gerard@interfold.com>)
List 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 by date:

Previous
From: Andrew McMillan
Date:
Subject: Re: Time Formatting
Next
From: hodges@xprt.net
Date:
Subject: Re: Time Formatting