X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.225.181]) by svr1.postgresql.org (Postfix) with ESMTP id 44BD1CCBBC for ; Fri, 18 Jul 2003 18:34:33 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr5.postgresql.org [64.117.225.181]) (amavisd-new, port 10024) with ESMTP id 56240-10 for ; Fri, 18 Jul 2003 18:34:53 +0000 (GMT) Received: from phoenix.ritterdosreis.br (unknown [200.198.106.115]) by svr1.postgresql.org (Postfix) with ESMTP id 1A631CBA17 for ; Fri, 18 Jul 2003 15:34:20 -0300 (ADT) Received: from desenv1.ritterdosreis.br (cardinal.ritterdosreis.br [192.168.1.3]) by phoenix.ritterdosreis.br (Postfix) with SMTP id 10DF139C587; Fri, 18 Jul 2003 15:28:39 -0300 (BRT) Date: Fri, 18 Jul 2003 15:30:45 -0300 From: Felipe Schnack To: Dmitry Tkach Cc: Kim Ho , Fernando Nasser , Barry Lind , pgsql-jdbc-list , Dave Cramer Subject: Re: Prepared Statements Message-Id: <20030718153045.53b744d2.felipes@ritterdosreis.br> In-Reply-To: <3F183AE0.8060204@openratings.com> References: <3F174BFF.3070704@xyth os.com> <3F1801C5.9030104@openratings.com> <3F181A81.70208@xythos.com> <3F18259C.6090503@redhat.com> <1058548037.19658.159.camel@topanga.toronto.r edhat.com> <3F183004.4010508@openratings.com> <3F1830F6.3020203@openratings.com> <1058550328.19657.168.camel@topanga.toronto.redhat.com> <3F183423.9030900@openratings.com> <1058551402.20165.177.camel@topanga.toronto.redhat.com> <3F183AE0.8060204@openratings.com> Organization: Ritter dos Reis X-Mailer: Sylpheed version 0.9.3claws2 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/151 X-Sequence-Number: 7535 Yes, If a patch prevents this use of setObject() for IN clauses, and also= will HAVE to create my own driver, something I'm trying to avoid at all co= sts On Fri, 18 Jul 2003 14:22:24 -0400 Dmitry Tkach wrote: > Kim Ho wrote: >=20 > >>>In any case, here is a revised version of the patch. =3D) Thanks for t= he > >>>pointers. > >>> > >>>=20=20=20=20=20=20 > >>> > >>I must be missing something, but I don't see any difference with the=20 > >>previous version .... > >> > >>=20=20=20=20 > >> > >There is an attempt to do a: > >Double.valueOf(x.toString()); > > > >in bindNumbers to ensure that the object's string representation is a > >number. This is what you were talking about before right? > >=20=20 > > > Oh, I see... > Now you end up parsing it twice in some cases (once in removeRadix(),=20 > and once again in bindNumber()) - why don't you merge those two together= =20 > to save one parse? >=20 > Not that I care, because I am not going to be able to use this at all=20 > (and will have to build my own driver if it ever gets in), because it=20 > breaks the existing functionality :-( >=20 > The hex thing may be questionable - although, I do sympathize with=20 > people who may be using it currently, and will be forced to rewrite=20 > their app now, but, at least, they have a (relatively) simple solution=20 > (which is to take on the backend's parsing of hex numbers, and do it on= =20 > the app side)... > What I am concerned about is the "in" thing - >=20 > select * from sometable where x in ?; > setObject (1, "(1,2,3,4,5)"); >=20 > that works just fine right now, and will be irreperably broken by this=20 > patch... > No way I am going to rewrite all the existing code to do something like >=20 > select * from sometable where x in=20 > (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,= ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?= ,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,= ?,?,?,?,?,?,?,?,?) > ... and then loop through the set and set each param separately, hoping= =20 > I have enough questionmarks to fit them all in :-) >=20 >=20 > Dima >=20 > >About breaking functionality with hex.=20 > > > >I'm not sure about this, maybe we could get other opinions in > >(specifically Dave and Barry). I'm not so sure that it should be > >allowed. (I am not saying that it is not useful.) > > > >Cheers, > > > >Kim > >=20=20 > > >=20 >=20 >=20 > ---------------------------(end of broadcast)--------------------------- > TIP 7: don't forget to increase your free space map settings --=20 /~\ The ASCII Felipe Schnack (felipes@ritterdosreis.br) \ / Ribbon Campaign Analista de Sistemas X Against HTML Cel.: 51-91287530 / \ Email! Linux Counter #281893 Centro Universit=E1rio Ritter dos Reis http://www.ritterdosreis.br ritter@ritterdosreis.br Fone: 51-32303341