X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E6128DB90F for ; Wed, 23 Nov 2005 09:13:16 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 74941-09 for ; Wed, 23 Nov 2005 13:13:19 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 05A5FDB8FE for ; Wed, 23 Nov 2005 09:13:13 -0400 (AST) Received: (qmail 25844 invoked from network); 23 Nov 2005 13:13:16 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 23 Nov 2005 13:13:16 -0000 In-Reply-To: <200511231905.53085.xinxincute@gmail.com> References: <200511211718.26679.xinxincute@gmail.com> <200511231905.53085.xinxincute@gmail.com> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <1D9D2DAF-EA25-4129-A188-84DAEAD94D4B@fastcrypt.com> Cc: Kris Jurka , pgsql-jdbc@postgresql.org Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: Can PostgreSQL do data type automated casting in prepared Date: Wed, 23 Nov 2005 08:13:15 -0500 To: Tjioe Ai Xin X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.012 required=5 tests=[AWL=0.012] X-Spam-Score: 0.012 X-Spam-Level: X-Archive-Number: 200511/169 X-Sequence-Number: 14267 Please see the following for all the connection parameters. http://jdbc.postgresql.org/documentation/head/connect.html#connection- parameters Dave On 23-Nov-05, at 7:05 AM, Tjioe Ai Xin wrote: > Dear Kris, > > Where I can set protocolVersion=2? > And how about the performance? > > Thanks in advance. > Xin Xin > > On Tuesday 22 November 2005 06:08, Kris Jurka wrote: >> >> 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 >> >> >> ---------------------------(end of >> broadcast)--------------------------- >> TIP 6: explain analyze is your friend >> > > ---------------------------(end of > broadcast)--------------------------- > TIP 9: In versions below 8.0, the planner will ignore your desire to > choose an index scan if your joining column's datatypes do not > match >