pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Broersma <richard.broersma@gmail.com>
To: Ashish Jain <ashjain2@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer
Date: Wed, 17 Jun 2009 07:56:53 -0700
Message-ID: <396486430906170756n3c8698fbm3951c0029dc673f1@mail.gmail.com> (raw)
In-Reply-To: <14af40510906170635w7c793ef0p3f36b13fc9958cdb@mail.gmail.com>
References: <14af40510906170635w7c793ef0p3f36b13fc9958cdb@mail.gmail.com>

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



view thread (26+ messages)  latest in thread

Message-ID: <396486430906170756n3c8698fbm3951c0029dc673f1@mail.gmail.com>
Permalink:  ../396486430906170756n3c8698fbm3951c0029dc673f1@mail.gmail.com/
Also on:    postgresql.org/message-id/396486430906170756n3c8698fbm3951c0029dc673f1@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-jdbc@postgresql.org
  Cc: richard.broersma@gmail.com, ashjain2@gmail.com
  Subject: Re: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer
  In-Reply-To: <396486430906170756n3c8698fbm3951c0029dc673f1@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox