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

Re: Reg: Changing Column type

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "sandhya" <sandhyar(at)amiindia(dot)co(dot)in>
Cc: "postgre" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Reg: Changing Column type
Date: 2005-11-15 14:32:22
Message-ID: 10416.1132065142@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-admin
"sandhya" <sandhyar(at)amiindia(dot)co(dot)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

In response to

pgsql-admin by date

Next:From: Kevin GrittnerDate: 2005-11-15 15:12:04
Subject: Re: ERROR: could not read block
Previous:From: Andrew SullivanDate: 2005-11-15 13:32:02
Subject: Re: Major Problem, need help! Can't run our website!

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