Re: IN clauses via setObject(Collection) [Was: Re: Prepared

From: Felipe Schnack <felipes(at)ritterdosreis(dot)br>
To: Paul Thomas <paul(at)tmsl(dot)demon(dot)co(dot)uk>
Cc: "pgsql-jdbc (at) postgresql (dot) org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: IN clauses via setObject(Collection) [Was: Re: Prepared
Date: 2003-07-22 12:08:23
Message-ID: 20030722090823.5b7c68f6.felipes@ritterdosreis.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Well, that's your opinion, calm down :-)
Anyway, I really think the solution of add various parameter marks ("?") and fill the ones you don't use with nulls is rather awful. There is a database that provides another solution for that?

On Tue, 22 Jul 2003 09:34:10 +0100
Paul Thomas <paul(at)tmsl(dot)demon(dot)co(dot)uk> wrote:

>
> 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 |
> +------------------------------+---------------------------------------------+
>
> ---------------------------(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

--

/~\ 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

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Fernando Nasser 2003-07-22 12:59:06 Re: IN clauses via setObject(Collection) [Was: Re: Prepared
Previous Message Felipe Schnack 2003-07-22 12:00:45 Re: the IN clause saga