X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 26A0656489 for ; Wed, 9 Mar 2005 03:58:41 +0000 (GMT) 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 14867-10 for ; Wed, 9 Mar 2005 03:58:36 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.194]) by svr1.postgresql.org (Postfix) with ESMTP id 147EC56471 for ; Wed, 9 Mar 2005 03:58:35 +0000 (GMT) Received: by wproxy.gmail.com with SMTP id 68so38088wri for ; Tue, 08 Mar 2005 19:58:40 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=V2lfRDNLl907bo3DHOIvlNKCDLtmdDWLlqbfS8IvlvuRiMlK2l9UoNQPxhcwSFzB9QPCc8/3+K4jh/XmM+IX27AAkiQaYomYEho47iCVy/7lNGyDmL8eJU157OFB1ewMLteskWaapun1pJ1iZ8d0YkXDxeMlAecKgU94UkNF+KM= Received: by 10.54.30.53 with SMTP id d53mr337352wrd; Tue, 08 Mar 2005 19:58:40 -0800 (PST) Received: by 10.54.31.54 with HTTP; Tue, 8 Mar 2005 19:58:40 -0800 (PST) Message-ID: <2989532e05030819582e7c8d0a@mail.gmail.com> Date: Wed, 9 Mar 2005 09:28:40 +0530 From: Antony Paul Reply-To: Antony Paul To: Oliver Jowett Subject: Re: FW: PreparedStatement#setString on non-string parameters Cc: Silvio Bierman , PostgreSQL JDBC In-Reply-To: <422E1D76.6080307@opencloud.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <422E1D76.6080307@opencloud.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.731 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, FROM_ENDS_IN_NUMS, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200503/77 X-Sequence-Number: 12469 Does this new stuff added in 8.0 driver adds to performance ?. I had this setString() problem and I tested 7.4.x driver which works and performs better than 8.0 driver. On Wed, 09 Mar 2005 10:47:34 +1300, Oliver Jowett wrote: > Silvio Bierman wrote: > > > Either the JDBC drivers for the databases I mentioned earlier do the > > conversion or the database backends do it on the server side. Any way, this > > works in all cases. PostgreSQL is the first database to break our > > application due to this behaviour. We have had problems on earlier versions > > of MySQL because of lack of subselect support etc. but never these issues. > > I'd suggest using CAST in your SQL -- that in theory should work > everywhere and reflects your application's intent (to interpret a string > as a numeric value). > > The problem with reverting to the old way of doing parameters (direct > text substitution into the query) is that we cannot take advantage of > most of the new stuff in the V3 protocol -- that means no server-side > prepared statement reuse, no low-overhead transfer of large parameters, > and reduced support for cursor-based resultsets. > > -O > > ---------------------------(end of broadcast)--------------------------- > TIP 9: the planner will ignore your desire to choose an index scan if your > joining column's datatypes do not match > -- rgds Antony Paul http://www.geocities.com/antonypaul24/