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

From: Fernando Nasser <fnasser(at)redhat(dot)com>
To: Dmitry Tkach <dmitry(at)openratings(dot)com>
Cc: Darin Ohashi <DOhashi(at)maplesoft(dot)com>, 'Oliver Jowett' <oliver(at)opencloud(dot)com>, Kim Ho <kho(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: IN clauses via setObject(Collection) [Was: Re: Prepare
Date: 2003-07-21 21:13:30
Message-ID: 3F1C577A.2050009@redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Just for reference, neither DB2 nor Oracle support passing the full list of
values as a single '?' parameter. In both cases you have to specify several ?
parameters (or :host variables) for each of the expected values.

Although I find this an annoying limitation, the fact remains that no
significant DBMS does what is being asked here.

PostgreSQL currently does not even accept '?' in the list. I have asked about
the possibility to support something in there. But even if the backend decides
to accept the full list it would be a PostgreSQL-only feature/enhancement and
not portable.

I feel very comfortable implementing standards but not at extending them. If
one day the standard body decides to implement it in a way different from the
way you did you end up with backward compatibility problems. Not to mention
that you end up tricking people into using some non-standard exception and
preventing them to use another DBMS. Although I see no reason to use anything
but PostgreSQL, this looks somewhat like M$ tactics ;-)

--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser(at)redhat(dot)com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message David Wall 2003-07-21 21:15:07 Re: Detecting 'socket errors' - closing the Connection object
Previous Message Barry Lind 2003-07-21 20:48:59 Re: [Fwd: Array.getArray ()]