Skip site navigation (1) Skip section navigation (2)

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 19:58:36
Message-ID: 3F1C45EC.30207@redhat.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Dmitry Tkach wrote:> Fernando Nasser wrote:
> 
>> Darin Ohashi wrote:
>>
>>>> There is no technical reason why sql prepare cannot support "IN ?"
>>>> If it is not supported by the backend at the moment should not 
>>>> affect the general decision of whether or not having such a feature 
>>>> is useful to have in the jdbc driver or not.
>>>>
>>
>> Unfortunately it does.  How can we justify a feature that only works 
>> when we are simulating prepared statements and fails when we are using 
>> the real PREPARED statements as provided by the server? 
> 
> 
> It should not *fail* of course.
> The driver should take care of it. If the backend does not support 
> PREPARE/EXECUTE with sets as parameters, the driver should  know about 
> that, and handle it as a special case
> 

You are suggesting that when the driver detects that one of the parameters is 
the value for an IN clause (i.e., an <in values list>) it should abstain to use 
the server prepared statements and falls back to use the client emulation 
instead?   Isn't that a little unsettling for the user, who is expecting that 
the prepared statements are being handled by the server?

You understand, also, that we would have to keep the client emulation code 
around with all complications and limitations that it has (for not being in the 
server)even when all supported backend versions have PREPARED implemented.


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


In response to

Responses

pgsql-jdbc by date

Next:From: Dmitry TkachDate: 2003-07-21 20:14:33
Subject: Re: IN clauses via setObject(Collection) [Was: Re: Prepare
Previous:From: Dmitry TkachDate: 2003-07-21 19:45:23
Subject: Re: IN clauses via setObject(Collection) [Was: Re: Prepare

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group