pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Java equivalent data type for chkpass.
2+ messages / 2 participants
[nested] [flat]

* Java equivalent data type for chkpass.
@ 2010-01-21 14:47 Saurabh Jain <saurabhjain_2010@yahoo.co.in>
  2010-01-21 15:22 ` Re: Java equivalent data type for chkpass. Kris Jurka <books@ejurka.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Saurabh Jain @ 2010-01-21 14:47 UTC (permalink / raw)
  To: pgsql-jdbc

Hello,

I am updating chkpass data type column using JDBC preparedstatement, but it give me following exception.

org.postgresql.util.PSQLException: ERROR: column "password" is of type chkpass but expression is of type character varying
  Hint: You will need to rewrite or cast the expression.
  Position: 73
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:367)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:321)
    at com.servient.processor.utilities.ToolUtils.main(ToolUtils.java:58)

Is anybody aware of the data type we should set for this password column?

Thanks
--Saurabh


      The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Java equivalent data type for chkpass.
  2010-01-21 14:47 Java equivalent data type for chkpass. Saurabh Jain <saurabhjain_2010@yahoo.co.in>
@ 2010-01-21 15:22 ` Kris Jurka <books@ejurka.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Kris Jurka @ 2010-01-21 15:22 UTC (permalink / raw)
  To: Saurabh Jain <saurabhjain_2010@yahoo.co.in>; +Cc: pgsql-jdbc



On Thu, 21 Jan 2010, Saurabh Jain wrote:

> I am updating chkpass data type column using JDBC preparedstatement, but it
> give me following exception.
> 
> org..postgresql.util.PSQLException: ERROR: column "password" is of type
> chkpass but expression is of type character varying
> 
> Is anybody aware of the data type we should set for this password column?
>

You should use setObject(index, value, Types.OTHER) to indicate that it's 
not the exact type of value (String apparently), but something else 
instead.

Kris Jurka




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2010-01-21 15:22 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-01-21 14:47 Java equivalent data type for chkpass. Saurabh Jain <saurabhjain_2010@yahoo.co.in>
2010-01-21 15:22 ` Kris Jurka <books@ejurka.com>

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