Re: BIGINT <-> java.lang.String auto cast - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: BIGINT <-> java.lang.String auto cast
Date
Msg-id 42955D8A.4090303@opencloud.com
Whole thread Raw
In response to Re: BIGINT <-> java.lang.String auto cast  ("Sergey A. Sokolov" <abac@xtech.ru>)
List pgsql-jdbc
Sergey A. Sokolov wrote:

> I think there must be support for String as input and output parameters for
> the most of Postgres datatypes (numeric, date,..). Just my humble opinion.

You need to talk to the backend developers; this is just the way that
the backend's default implicit casts are set up. The driver change is
that we are actually passing the type information provided at the JDBC
level (e.g. "This parameter is a Java long because I called setLong()")
down to the backend, rather than going via a stringizing step which
loses that information. Why would you want to throw this type
information away?

BTW, my reading of the JDBC spec says nothing about implicit type
conversion on setString being required.

-O

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: BIGINT <-> java.lang.String auto cast
Next
From: Giuseppe Sacco
Date:
Subject: Re: DatabaseMetaData.getExtraNameCharacters