Skip site navigation (1) Skip section navigation (2)

Reg: Changing Column type

From: "sandhya" <sandhyar(at)amiindia(dot)co(dot)in>
To: "postgre" <pgsql-admin(at)postgresql(dot)org>
Cc: "sandhya" <sandhyar(at)amiindia(dot)co(dot)in>
Subject: Reg: Changing Column type
Date: 2005-11-15 11:52:16
Message-ID: 03e901c5e9db$06ba00d0$cd00000a@amiindiahjwbgh (view raw or flat)
Thread:
Lists: pgsql-admin
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




Responses

pgsql-admin by date

Next:From: Andrew SullivanDate: 2005-11-15 13:25:01
Subject: Re: ERROR: could not read block
Previous:From: Jonah H. HarrisDate: 2005-11-15 06:28:12
Subject: Re: [HACKERS] Major Problem, need help! Can't run our

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group