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 72A645381B for ; Sat, 2 Apr 2005 02:06:01 +0100 (BST) 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 16362-01 for ; Sat, 2 Apr 2005 01:05:54 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id C02835384D for ; Sat, 2 Apr 2005 02:05:50 +0100 (BST) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j3215h7Q005875 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 1 Apr 2005 18:05:46 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j3215hrt009014; Fri, 1 Apr 2005 18:05:43 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j3215g1s009013; Fri, 1 Apr 2005 18:05:42 -0700 (MST) (envelope-from mfuhr) Date: Fri, 1 Apr 2005 18:05:42 -0700 From: Michael Fuhr To: "sharma;G.S." Cc: pgsql-admin@postgresql.org Subject: Re: Can WE modify column of a table in postgres 7.3 Message-ID: <20050402010542.GA8963@winnie.fuhr.org> References: <00a301c53689$86d2ab60$be05a8c0@ng3024> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00a301c53689$86d2ab60$be05a8c0@ng3024> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.004 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/30 X-Sequence-Number: 17043 On Fri, Apr 01, 2005 at 12:37:51PM +0530, sharma;G.S. wrote: > > I want to rename and modify the data type of a column in postgres 7.3 > can any body help me ...that it is possible to do the above in postgres > and if yes pls provide me the syntax You can rename columns with ALTER TABLE: http://www.postgresql.org/docs/7.3/interactive/sql-altertable.html In 8.0 and later you can use ALTER TABLE to change a column's type; see the FAQ for how to do it in older versions: http://www.postgresql.org/docs/faqs.FAQ.html#4.3 -- Michael Fuhr http://www.fuhr.org/~mfuhr/