Re: changing column size and type.

From: Rudi Starcevic <rudi(at)oasis(dot)net(dot)au>
To: pginfo <pginfo(at)t1(dot)unisoftbg(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: changing column size and type.
Date: 2003-04-16 05:57:47
Message-ID: 3E9CF0DB.60509@oasis.net.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Ivan,

This link show's how to do it online.

http://www.edoceo.com/liberum/default.php?doc=postgresql-tricks

There are other links around too.

Cheers
Rudi

pginfo wrote:

>Hi George,
>
>It is possible to do it so, but I wanted some better solution.
>For example with oracle I can do it "online".
>
>regards,
>ivan.
>
>George Weaver wrote:
>
>
>
>>Hi Ivan,
>>
>>I don't know if this is a recommended practice or not, but you can try the
>>following.
>>
>>Use PgDump to back up the entire database as a text file. Edit the backup
>>text file and change the CREATE TABLE statement for the table you want to
>>change, changing the column width to the new width desired. Restore the
>>database. The database will be restored with the new width for the column
>>in the table.
>>
>>The ability to do this depends on the size of the database, whether it can
>>be taken off line, etc. etc.
>>
>>HTH
>>George
>>
>>----- Original Message -----
>>From: "pginfo" <pginfo(at)t1(dot)unisoftbg(dot)com>
>>To: <pgsql-sql(at)postgresql(dot)org>
>>Sent: Tuesday, April 15, 2003 9:21 AM
>>Subject: [SQL] changing column size and type.
>>
>>
>>
>>>Hi,
>>>
>>>I am using pg 7.3.2.
>>>
>>>Is it possible to change:
>>>- column size ot existing table.
>>>- columnt size ( it is varchar basicaly).
>>>
>>>The problem is that the table have many freferences from and to it.
>>>
>>>many thanks,
>>>ivan.
>>>
>>>
>>>---------------------------(end of broadcast)---------------------------
>>>TIP 5: Have you checked our extensive FAQ?
>>>
>>>http://www.postgresql.org/docs/faqs/FAQ.html
>>>
>>>
>>>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 5: Have you checked our extensive FAQ?
>
>http://www.postgresql.org/docs/faqs/FAQ.html
>
>
>

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message friedrich nietzsche 2003-04-16 07:54:07 Re: connecting to a differnt DB in PL/pgSQL
Previous Message Rajesh Kumar Mallah 2003-04-16 05:26:35 Re: plpgsql