pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Change in parameters' order in prepared statement??
3+ messages / 2 participants
[nested] [flat]

* Change in parameters' order in prepared statement??
@ 2005-09-02 22:33 Andres Olarte <olarte.andres@gmail.com>
  2005-09-02 22:45 ` Re: Change in parameters' order in prepared statement?? Oliver Jowett <oliver@opencloud.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Andres Olarte @ 2005-09-02 22:33 UTC (permalink / raw)
  To: pgsql-jdbc

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?



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Change in parameters' order in prepared statement??
  2005-09-02 22:33 Change in parameters' order in prepared statement?? Andres Olarte <olarte.andres@gmail.com>
@ 2005-09-02 22:45 ` Oliver Jowett <oliver@opencloud.com>
  2005-09-04 05:44   ` Re: Change in parameters' order in prepared statement?? Oliver Jowett <oliver@opencloud.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Oliver Jowett @ 2005-09-02 22:45 UTC (permalink / raw)
  To: Andres Olarte <olarte.andres@gmail.com>; +Cc: pgsql-jdbc

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?

-O



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Change in parameters' order in prepared statement??
  2005-09-02 22:33 Change in parameters' order in prepared statement?? Andres Olarte <olarte.andres@gmail.com>
  2005-09-02 22:45 ` Re: Change in parameters' order in prepared statement?? Oliver Jowett <oliver@opencloud.com>
@ 2005-09-04 05:44   ` Oliver Jowett <oliver@opencloud.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Oliver Jowett @ 2005-09-04 05:44 UTC (permalink / raw)
  To: 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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2005-09-04 05:44 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-09-02 22:33 Change in parameters' order in prepared statement?? Andres Olarte <olarte.andres@gmail.com>
2005-09-02 22:45 ` Oliver Jowett <oliver@opencloud.com>
2005-09-04 05:44   ` Oliver Jowett <oliver@opencloud.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox