Hi Richard,
I have created a function and a cast in the following way. It helps me to subside the error but I still do not get the desired result. So I am not sure if this only helps to subside the error message.
create function integer2character(in integer) returns character as 'select
$1::character' language sql immutable returns null on null input;
create cast (integer AS character) with function integer2character (in integer) AS
implicit;
Thanks
Ashish
On Wed, Jun 17, 2009 at 8:26 PM, Richard Broersma
<richard.broersma@gmail.com> wrote:
On Wed, Jun 17, 2009 at 6:35 AM, Ashish Jain<
ashjain2@gmail.com> wrote:
> Can any one help me to write a cast statement which automatically cast
> integer to character??
The SQL standard way would be: CAST( your_int_column AS TEXT )
or the Postgresql way: your_int_column::TEXT
--
Regards,
Richard Broersma Jr.
Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug