From: Albert REINER <areiner@tph.tuwien.ac.at>
To: pgsql-sql@postgresql.org
Subject: Re: How to modify type in table?
Date: Mon, 5 Feb 2001 18:39:19 +0100
Message-ID: <20010205183919.B1866@frithjof> (raw)
In-Reply-To: <015601c08a6b$dd92e7e0$6d9a96cb@ntl>
References: <015601c08a6b$dd92e7e0$6d9a96cb@ntl>
Saluton,
On Tue, Jan 30, 2001 at 10:22:23AM +0700, Jaruwan Laongmal wrote:
> Dear Sir.
> Would you like to inform me how to modify type in table?
> For example , I define type as varchar(14) , but I want to modify to varchar(120). How to do this.
If it is not too much data, the easiest would be to use pg_dump to
dump the database (or just the table), edit the definition, and feed
the changed file to psql in order to get the data back. Or you can
create a different table with the correct structure, copy the data
there, drop the old table, rename the new one to the correct one.
Albert.
--
--------------------------------------------------------------------------
Albert Reiner <areiner@tph.tuwien.ac.at>
Deutsch * English * Esperanto * Latine
--------------------------------------------------------------------------
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: areiner@tph.tuwien.ac.at
Subject: Re: How to modify type in table?
In-Reply-To: <20010205183919.B1866@frithjof>
References: <015601c08a6b$dd92e7e0$6d9a96cb@ntl> <20010205183919.B1866@frithjof>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox