X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 23BCAD1B4EB for ; Mon, 27 Oct 2003 17:54:29 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 95135-10 for ; Mon, 27 Oct 2003 13:53:58 -0400 (AST) Received: from stan.ringways.co.uk (hub.ringways.co.uk [213.38.87.130]) by svr1.postgresql.org (Postfix) with ESMTP id 7DF5BD1B4EF for ; Mon, 27 Oct 2003 13:53:56 -0400 (AST) Received: from gary.ringways.co.uk ([10.1.1.2]) by stan.ringways.co.uk with esmtp (Exim 3.22 #1) id 1AEBYq-0006ZC-00; Mon, 27 Oct 2003 17:53:48 +0000 Content-Type: text/plain; charset="iso-8859-1" From: Gary Stainburn Organization: Ringways Garages Ltd To: mohan@physics.gmu.edu, Subject: Re: URGENT!!! changing Column size Date: Mon, 27 Oct 2003 17:50:03 +0000 User-Agent: KMail/1.4.3 References: <64184.138.88.163.115.1067274631.squirrel@physics.gmu.edu> In-Reply-To: <64184.138.88.163.115.1067274631.squirrel@physics.gmu.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200310271750.03143.gary.stainburn@ringways.co.uk> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/346 X-Sequence-Number: 15746 On Monday 27 Oct 2003 5:10 pm, mohan@physics.gmu.edu wrote: > Hi can we change the size of a column in postgres. I have a table named > institution and column name is name varchar2(25), i want to change it to > varchar2(50). Please let me know. > > --Mohan try alter table institution add column newname varchar2(50); update institution set newname = name; alter table institution drop column namel; alter table institution rename column newname to name; > > > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclosed purposes - Regulation of Investigatory Powers Act, 2000