Re: Can PostgreSQL do data type automated casting in prepared - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Can PostgreSQL do data type automated casting in prepared
Date
Msg-id Pine.BSO.4.61.0511211806430.23994@leary.csoft.net
Whole thread Raw
In response to Can PostgreSQL do data type automated casting in prepared statement?  (Tjioe Ai Xin <xinxincute@gmail.com>)
Responses Re: Can PostgreSQL do data type automated casting in  (Mark Lewis <mark.lewis@mir3.com>)
Re: Can PostgreSQL do data type automated casting in prepared  (Tjioe Ai Xin <xinxincute@gmail.com>)
List pgsql-jdbc

On Mon, 21 Nov 2005, Tjioe Ai Xin wrote:

>
> My code is like this: I have query: "Select count(*) / paramPage from
> tblFirst where condition"; The paramPage were filled from parameter
> which I specified as string data type. So I using setString method for
> my prepared statement for passing paramPage value. When I'm using the
> old jdbc driver pg74jdbc3.jar, I got no problem at all. But when I try
> to upgrade my PostgreSQL to 8.0.3. I got problem data type error.
>
> Can PostgreSQL do data type automated casting in prepared statement again?
> So I do not need change my code :)
>

Yes, and no.  You can restore the old behavior by adding
?protocolVersion=2 to your connection URL, but using the older protocol
also means some new features and performance gains will be unavailable to
you.

Kris Jurka


pgsql-jdbc by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Again the JSCreator and Metadata issues
Next
From: Kris Jurka
Date:
Subject: Re: Deadlock problem