Re: Reg: Changing Column type - Mailing list pgsql-admin

From Tom Lane
Subject Re: Reg: Changing Column type
Date
Msg-id 10416.1132065142@sss.pgh.pa.us
Whole thread Raw
In response to Reg: Changing Column type  ("sandhya" <sandhyar@amiindia.co.in>)
List pgsql-admin
"sandhya" <sandhyar@amiindia.co.in> 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

pgsql-admin by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: Major Problem, need help! Can't run our website!
Next
From: "Kevin Grittner"
Date:
Subject: Re: ERROR: could not read block