X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9E8E7DB6AA for ; Tue, 15 Nov 2005 10:32:27 -0400 (AST) 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 36380-08 for ; Tue, 15 Nov 2005 14:32:30 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 379FFD71C1 for ; Tue, 15 Nov 2005 10:32:24 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id jAFEWMll010417; Tue, 15 Nov 2005 09:32:24 -0500 (EST) To: "sandhya" cc: "postgre" Subject: Re: Reg: Changing Column type In-reply-to: <03e901c5e9db$06ba00d0$cd00000a@amiindiahjwbgh> References: <03e901c5e9db$06ba00d0$cd00000a@amiindiahjwbgh> Comments: In-reply-to "sandhya" message dated "Tue, 15 Nov 2005 17:22:16 +0530" Date: Tue, 15 Nov 2005 09:32:22 -0500 Message-ID: <10416.1132065142@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/185 X-Sequence-Number: 19558 "sandhya" writes: > When i am tring to change the column type from character/Varchar to = > "int" i am getting error like, > ERROR: column "fname" cannot be cast to type "int4" If this is a pre-8.0 PG version, try casting to text and then int4. If 8.0 or later, it should work as is --- would you show us exactly what you did? regards, tom lane