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 09D19DB7DA for ; Wed, 23 Nov 2005 07:56:41 -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 67243-03 for ; Wed, 23 Nov 2005 11:56:44 +0000 (GMT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.202]) by svr1.postgresql.org (Postfix) with ESMTP id 4AC89DB606 for ; Wed, 23 Nov 2005 07:56:39 -0400 (AST) Received: by zproxy.gmail.com with SMTP id 13so1353812nzn for ; Wed, 23 Nov 2005 03:56:42 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:references:in-reply-to:cc:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=kMvCb0oIAQbAhM+E8BJTHcNSiBqfel8A9lfIChycJEBe+oqU534QjYKFfCDwEjZUj8r05eOPou5/0V1+PouaJrxpF9v08Vq19Qcx/ksl5viZVWwsMdEEULCQycto1iJ3kT2gLK4WDLp3wzw4jcB+zR29sw2cCIyRzjSx3hV1iq4= Received: by 10.37.20.76 with SMTP id x76mr396491nzi; Wed, 23 Nov 2005 03:56:42 -0800 (PST) Received: from tirza.domain ( [222.124.238.3]) by mx.gmail.com with ESMTP id 36sm362183nzk.2005.11.23.03.56.37; Wed, 23 Nov 2005 03:56:42 -0800 (PST) From: Tjioe Ai Xin To: Kris Jurka Subject: Re: Can PostgreSQL do data type automated casting in prepared Date: Wed, 23 Nov 2005 19:05:52 +0700 User-Agent: KMail/1.8 References: <200511211718.26679.xinxincute@gmail.com> In-Reply-To: Cc: pgsql-jdbc@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511231905.53085.xinxincute@gmail.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/168 X-Sequence-Number: 14266 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 >