X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C878052835 for ; Tue, 28 Jun 2005 12:31:06 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 53827-07 for ; Tue, 28 Jun 2005 15:30:57 +0000 (GMT) Received: from titan.ecommit.de (titan.ecommit.de [195.145.58.245]) by svr1.postgresql.org (Postfix) with ESMTP id 66A8E529EB for ; Tue, 28 Jun 2005 12:30:55 -0300 (ADT) Received: from titan.ecommit.de (localhost [127.0.0.1]) by titan.ecommit.de (8.12.6/8.12.6/SuSE Linux 0.6) with ESMTP id j5SFUj0F031274; Tue, 28 Jun 2005 17:30:46 +0200 Received: from titan.ecommit.de (root@localhost) by titan.ecommit.de (8.12.6/8.12.6/Submit) with ESMTP id j5SFUjUc031273; Tue, 28 Jun 2005 17:30:45 +0200 Received: from fandelm.ecommit.de (fandelm.tc.de 192.168.252.51) by titan.ecommit.de (Scalix SMTP Relay 9.0.0.26) via ESMTP; Tue, 28 Jun 2005 17:30:44 +0200 (CEST) Date: Tue, 28 Jun 2005 17:29:11 +0200 From: "Martin Fandel" To: chen@musc.edu Cc: pgsql-admin@postgresql.org Message-ID: <1119972551.18693.3.camel@fandelm.ecommit.de> In-Reply-To: <42C1613F.4000605@musc.edu> References: <42C15044.4030407@musc.edu> References: <200506281614.25981.peter_e@gmx.net> References: <42C1613F.4000605@musc.edu> Subject: Re: change existing table definition x-scalix-Hops: 1 X-Mailer: Evolution 2.0.1 Mime-Version: 1.0 Content-Type: text/plain Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.045 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/266 X-Sequence-Number: 18021 Hi ALTER TABLE is only in PostgreSQL 8. But you can create a new table with varchar(50) and copy the data from the existing into the new table. How much relation_size has your table? Do you create the dbsize-functions which are included in the contrib package? Best regards, Martin Am Dienstag, den 28.06.2005, 10:39 -0400 schrieb Chuming Chen: > Peter Eisentraut wrote: > > >Chuming Chen wrote: > > > > > >>How can I change the column definition of an existing table, ie. from > >>varchar(30) to varchar(50)? Is there any way to add a new column to > >>an existing table? > >> > >> > > > >The ALTER TABLE command can do all that. You need version 8.0 or later > >for some functionality though. > > > > > > > Is there another way to do it in 7.* ? > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org