pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dmitry Tkach <dmitry@openratings.com>
To: Fernando Nasser <fnasser@redhat.com>
Cc: Barry Lind <blind@xythos.com>
Cc: wsheldah@lexmark.com
Cc: pgsql-jdbc @ postgresql . org <pgsql-jdbc@postgresql.org>
Subject: Re: Prepared Statements
Date: Fri, 18 Jul 2003 11:41:05 -0400
Message-ID: <3F181511.70609@openratings.com> (raw)
In-Reply-To: <3F181054.5080707@redhat.com>
References: <OFBD7C18F4.2499D62A-ON85256D66.005245AA@lexmark.com>
	<3F174BFF.3070704@xythos.com>
	<3F1801C5.9030104@openratings.com>
	<3F18065A.1060406@redhat.com>
	<3F180FB2.3090408@openratings.com>
	<3F181054.5080707@redhat.com>

>
> Well, I guess the bug will have be fixed asap as it is a security risk. 


I am afraid, it will :-(
That's exactly why, as I told you yesterday, I tried to avoid upgrading 
my driver versions too frequently - because of the 'bug fixes' like 
this, that break stuff....

>
> What is the proper JDBC way for filling IN lists in prepared statements?

I am afraid, there is no standard about it :-(
Depends on the vendor...
Most of them (not postgres) support SQLData - to let you define and pass 
in arbitrary types...

Some (like infomirx for example... don't know about Oracle) have sets 
and arrays interchangeable - so that
setObject (1, sqlArrayContainingIdsToMatch, Types.ARRAY)
can be used...

Some people are used to hacks, like one described in an earlier post - 
where yuo create a statement with an awful lot of questionmarks, and 
then set each member of the set separately and cross your fingers, 
hoping that you have enough placeholders for your whole set...

Dima






view thread (105+ messages)  latest in thread

Message-ID: <3F181511.70609@openratings.com>
Permalink:  ../3F181511.70609@openratings.com/
Also on:    postgresql.org/message-id/3F181511.70609@openratings.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: dmitry@openratings.com, fnasser@redhat.com, blind@xythos.com, wsheldah@lexmark.com
  Subject: Re: Prepared Statements
  In-Reply-To: <3F181511.70609@openratings.com>
  References: <OFBD7C18F4.2499D62A-ON85256D66.005245AA@lexmark.com> <3F174BFF.3070704@xythos.com> <3F1801C5.9030104@openratings.com> <3F18065A.1060406@redhat.com> <3F180FB2.3090408@openratings.com> <3F181054.5080707@redhat.com> <3F181511.70609@openratings.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox