Received: from frithjof.reiner (c05.dialin.tuwien.ac.at [192.35.243.15]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f15L0Gx69652 for ; Mon, 5 Feb 2001 16:00:16 -0500 (EST) (envelope-from areiner@tph.tuwien.ac.at) Received: (qmail 1973 invoked by uid 500); 5 Feb 2001 17:39:19 -0000 From: "Albert REINER" Date: Mon, 5 Feb 2001 18:39:19 +0100 To: pgsql-sql@postgresql.org Subject: Re: How to modify type in table? Message-ID: <20010205183919.B1866@frithjof> Mail-Followup-To: pgsql-sql@postgresql.org References: <015601c08a6b$dd92e7e0$6d9a96cb@ntl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <015601c08a6b$dd92e7e0$6d9a96cb@ntl>; from jaruwan@gits.net.th on Tue, Jan 30, 2001 at 10:22:23AM +0700 X-Archive-Number: 200102/60 X-Sequence-Number: 1230 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 Deutsch * English * Esperanto * Latine --------------------------------------------------------------------------