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

Re: Change in parameters' order in prepared statement??

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Change in parameters' order in prepared statement??
Date: 2005-09-04 05:44:43
Message-ID: 431A89CB.7040201@opencloud.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Oliver Jowett wrote:
> Andres Olarte wrote:
> 
>>I recently updated the driver to the latest CVS version, and found a
>>change in the way parameters are handled.  Before, the first parameter
>>was 1, as in:
>>
>>update.setInt(1,cbid);
>>
>>But now it's 2, as in:
>>
>>update.setInt(2,cbid);
>>
>>I'm using only IN parameters to call a prepared SELECT. Is this the
>>correct behaviour? Is it going to stay this way?
> 
> 
> This sounds like a bug -- can you provide a more detailed testcase?

Per off-list discussion this seems to be a bug that affects non-{call}
queries prepared via prepareCall() only; if prepareStatement() is used,
it works fine. I haven't dug deeper, but perhaps this is a bug
introduced by the OUT parameter support.

-O

In response to

pgsql-jdbc by date

Next:From: Angelo NeuschitzerDate: 2005-09-07 16:52:51
Subject: BUG #1864: Strange behavoir of batches
Previous:From: Oliver JowettDate: 2005-09-02 22:45:54
Subject: Re: Change in parameters' order in prepared statement??

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