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 689EED1B532 for ; Mon, 27 Oct 2003 17:46:00 +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-08 for ; Mon, 27 Oct 2003 13:45:29 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 1BA1BD1B522 for ; Mon, 27 Oct 2003 13:45:07 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id h9RHj5Nu054653 for ; Mon, 27 Oct 2003 17:45:05 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id h9RHhcnX054250 for pgsql-sql@postgresql.org; Mon, 27 Oct 2003 17:43:38 GMT From: CoL X-Newsgroups: comp.databases.postgresql.sql Subject: Re: URGENT!!! changing Column size Date: Mon, 27 Oct 2003 18:48:30 +0100 Organization: Hub.Org Networking Services Lines: 20 Message-ID: References: <64184.138.88.163.115.1067274631.squirrel@physics.gmu.edu> Reply-To: col@mportal.hu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en In-Reply-To: <64184.138.88.163.115.1067274631.squirrel@physics.gmu.edu> To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/353 X-Sequence-Number: 15753 Hi, mohan@physics.gmu.edu wrote, On 10/27/2003 6:10 PM: > 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. 1 solution: begin; create temporary table temp as select * from mytable; drop table mytable; create table mytable (name varchar(50)); insert into mytable select CAST(name AS varchar(50)) from temp; drop table temp; commit; C.