Re: Prepared Statements

From: Felipe Schnack <felipes(at)ritterdosreis(dot)br>
To: Dmitry Tkach <dmitry(at)openratings(dot)com>
Cc: Kim Ho <kho(at)redhat(dot)com>, Fernando Nasser <fnasser(at)redhat(dot)com>, Barry Lind <blind(at)xythos(dot)com>, pgsql-jdbc-list <pgsql-jdbc(at)postgresql(dot)org>, Dave Cramer <Dave(at)micro-automation(dot)net>
Subject: Re: Prepared Statements
Date: 2003-07-18 18:30:45
Message-ID: 20030718153045.53b744d2.felipes@ritterdosreis.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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 costs

On Fri, 18 Jul 2003 14:22:24 -0400
Dmitry Tkach <dmitry(at)openratings(dot)com> wrote:

> Kim Ho wrote:
>
> >>>In any case, here is a revised version of the patch. =) Thanks for the
> >>>pointers.
> >>>
> >>>
> >>>
> >>I must be missing something, but I don't see any difference with the
> >>previous version ....
> >>
> >>
> >>
> >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?
> >
> >
> Oh, I see...
> Now you end up parsing it twice in some cases (once in removeRadix(),
> and once again in bindNumber()) - why don't you merge those two together
> to save one parse?
>
> Not that I care, because I am not going to be able to use this at all
> (and will have to build my own driver if it ever gets in), because it
> breaks the existing functionality :-(
>
> The hex thing may be questionable - although, I do sympathize with
> people who may be using it currently, and will be forced to rewrite
> their app now, but, at least, they have a (relatively) simple solution
> (which is to take on the backend's parsing of hex numbers, and do it on
> the app side)...
> What I am concerned about is the "in" thing -
>
> select * from sometable where x in ?;
> setObject (1, "(1,2,3,4,5)");
>
> that works just fine right now, and will be irreperably broken by this
> patch...
> No way I am going to rewrite all the existing code to do something like
>
> select * from sometable where x in
> (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
> ... and then loop through the set and set each param separately, hoping
> I have enough questionmarks to fit them all in :-)
>
>
> Dima
>
> >About breaking functionality with hex.
> >
> >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
> >
> >
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings

--

/~\ The ASCII Felipe Schnack (felipes(at)ritterdosreis(dot)br)
\ / Ribbon Campaign Analista de Sistemas
X Against HTML Cel.: 51-91287530
/ \ Email! Linux Counter #281893

Centro Universitário Ritter dos Reis
http://www.ritterdosreis.br
ritter(at)ritterdosreis(dot)br
Fone: 51-32303341

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Darin Ohashi 2003-07-18 18:55:55 Re: Prepared Statements
Previous Message Dmitry Tkach 2003-07-18 18:22:24 Re: Prepared Statements