Re: IN clauses via setObject(Collection) [Was: Re: Prepared - Mailing list pgsql-jdbc

From Paul Thomas
Subject Re: IN clauses via setObject(Collection) [Was: Re: Prepared
Date
Msg-id 20030722093410.C4376@bacon
Whole thread Raw
In response to Re: IN clauses via setObject(Collection) [Was: Re: Prepared  (Fernando Nasser <fnasser@redhat.com>)
Responses Re: IN clauses via setObject(Collection) [Was: Re: Prepared  (Felipe Schnack <felipes@ritterdosreis.br>)
List pgsql-jdbc
On 21/07/2003 18:51 Fernando Nasser wrote:
> Also, we may limit this behavior with Collections to the IN clause
> only.  Where else could we need lists to replace the '?' ?

Nowhere. Not even with an IN clause. If the programmer needs IN(1,2,3,4,5)
then he must write IN(?,?,?,?,?) in his prepare string. That's the way
JDBC works. Period. Acceptance of any other behaviour is un-professional
and against the standards. As you said yourself, neither Oracle nor DB2
support this behavior. Neither should PostgreSQL.


--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants         |
http://www.thomas-micro-systems-ltd.co.uk   |
+------------------------------+---------------------------------------------+

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: RFC: Removal of support for JDBC1 drivers.
Next
From: Oliver Jowett
Date:
Subject: Re: Patch applied for SQL Injection vulnerability for setObject(int,Object,int)