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 04713DA2EF for ; Tue, 15 Nov 2005 07:44:31 -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 18872-08 for ; Tue, 15 Nov 2005 11:44:33 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mars.amiindia.co.in (unknown [203.199.198.229]) by svr1.postgresql.org (Postfix) with ESMTP id B4E9DD6D8C for ; Tue, 15 Nov 2005 07:44:22 -0400 (AST) Received: from amiindiahjwbgh ([10.0.0.205]) (authenticated bits=0) by mars.amiindia.co.in (8.12.11/8.12.11) with ESMTP id jAFBqYws019295; Tue, 15 Nov 2005 17:22:34 +0530 Message-ID: <03e901c5e9db$06ba00d0$cd00000a@amiindiahjwbgh> From: "sandhya" To: "postgre" Cc: "sandhya" Subject: Reg: Changing Column type Date: Tue, 15 Nov 2005 17:22:16 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_03E6_01C5EA09.20584C30" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.001 required=5 tests=[HTML_MESSAGE=0.001] X-Spam-Score: 0.001 X-Spam-Level: X-Archive-Number: 200511/182 X-Sequence-Number: 19555 This is a multi-part message in MIME format. ------=_NextPart_000_03E6_01C5EA09.20584C30 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, 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" I can able to change the column type to "int " if the old datatype is = double etc. Even a "int" datatype also i can able to conver to "char" and why not viceversa....Please tell me where the problem is. Suggest me what to do to convert a "char" datatype to "int". Thanks&Regards, Sandhya ------=_NextPart_000_03E6_01C5EA09.20584C30 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
When i am tring to change the column = type from=20 character/Varchar to "int" i am getting error like,
 
ERROR:  column "fname" cannot be = cast to type=20 "int4"
 
I can able to change the column type to = "int " if=20 the old datatype is double etc.
Even a "int" datatype also i can able = to conver to=20 "char"
and why not viceversa....Please tell me = where the=20 problem is.
Suggest me what to do to convert a = "char" datatype=20 to "int".
 
Thanks&Regards,
Sandhya
 

 
 
------=_NextPart_000_03E6_01C5EA09.20584C30--