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 B19625280D for ; Tue, 28 Jun 2005 11:26:37 -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 39653-09 for ; Tue, 28 Jun 2005 14:26:28 +0000 (GMT) Received: from smartmx-06.inode.at (smartmx-06.inode.at [213.229.60.38]) by svr1.postgresql.org (Postfix) with ESMTP id 2A27852AA5 for ; Tue, 28 Jun 2005 11:26:27 -0300 (ADT) Received: from [81.223.151.66] (port=27116 helo=[192.168.100.33]) by smartmx-06.inode.at with asmtp (Exim 4.34) id 1DnH2m-0007Yg-9J for pgsql-admin@postgresql.org; Tue, 28 Jun 2005 16:26:32 +0200 From: Johannes Lochmann Organization: i-penta Informationsmanagement GmbH To: pgsql-admin@postgresql.org Subject: Re: change existing table definition Date: Tue, 28 Jun 2005 16:26:19 +0200 User-Agent: KMail/1.8 References: <42C15044.4030407@musc.edu> In-Reply-To: <42C15044.4030407@musc.edu> X-message-flag: Please send plain text messages only. Thank =?iso-8859-15?q?you=2E=0A?= MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200506281626.20138.j.lochmann@i-penta.at> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200506/262 X-Sequence-Number: 18017 On Tuesday 28 June 2005 15:27, Chuming Chen wrote: Hello, > How can I change the column definition of an existing table, ie. from > varchar(30) to varchar(50)? You did not mention any version, so for 8.0.x: alter table t alter col type varchar(50); > Is there any way to add a new column to an > existing table? alter table t add colum foo varchar(127) Link tip: http://www.postgresql.org/docs/8.0/interactive/ddl-alter.html HTH Johannes