pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Driver compatibility with 7.3 server
4+ messages / 2 participants
[nested] [flat]

* Driver compatibility with 7.3 server
@ 2005-12-22 17:44 Mike Charnoky <noky@nextbus.com>
  2005-12-22 17:52 ` Re: Driver compatibility with 7.3 server Mike Charnoky <noky@nextbus.com>
  2005-12-22 21:11 ` Re: Driver compatibility with 7.3 server Oliver Jowett <oliver@opencloud.com>
  0 siblings, 2 replies; 4+ messages in thread

From: Mike Charnoky @ 2005-12-22 17:44 UTC (permalink / raw)
  To: pgsql-jdbc

Hi everyone, happy holidays!  We are are currently using Postgresql 7.3
and would like to be able to use cursors for large selects (ie: using
Statement.setFetchSize()).  Unfortunately, this is not implemented in
the 7.3 JDBC driver.  Is it possible to use a newer version of the JDBC
driver, say 7.4, with the 7.3 version of the db server?  Thanks.


Mike



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

* Re: Driver compatibility with 7.3 server
  2005-12-22 17:44 Driver compatibility with 7.3 server Mike Charnoky <noky@nextbus.com>
@ 2005-12-22 17:52 ` Mike Charnoky <noky@nextbus.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Mike Charnoky @ 2005-12-22 17:52 UTC (permalink / raw)
  To: pgsql-jdbc

Duh, I just now found some documentation on this issue here:

http://jdbc.postgresql.org/download.html#serverselection

Looks like the newer drivers *should* be compatible, so I'll give it a
shot.  Please let me know if this could be problematic.


Mike

Mike Charnoky wrote:
> Hi everyone, happy holidays!  We are are currently using Postgresql 7.3
> and would like to be able to use cursors for large selects (ie: using
> Statement.setFetchSize()).  Unfortunately, this is not implemented in
> the 7.3 JDBC driver.  Is it possible to use a newer version of the JDBC
> driver, say 7.4, with the 7.3 version of the db server?  Thanks.
> 
> 
> Mike
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly



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

* Re: Driver compatibility with 7.3 server
  2005-12-22 17:44 Driver compatibility with 7.3 server Mike Charnoky <noky@nextbus.com>
@ 2005-12-22 21:11 ` Oliver Jowett <oliver@opencloud.com>
  2005-12-22 21:35   ` Re: Driver compatibility with 7.3 server Mike Charnoky <noky@nextbus.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Oliver Jowett @ 2005-12-22 21:11 UTC (permalink / raw)
  To: Mike Charnoky <noky@nextbus.com>; +Cc: pgsql-jdbc

Mike Charnoky wrote:
> Hi everyone, happy holidays!  We are are currently using Postgresql 7.3
> and would like to be able to use cursors for large selects (ie: using
> Statement.setFetchSize()).  Unfortunately, this is not implemented in
> the 7.3 JDBC driver.  Is it possible to use a newer version of the JDBC
> driver, say 7.4, with the 7.3 version of the db server?  Thanks.

Later driver versions should work fine with a 7.3 server .. but ..

The setFetchSize() / cursor support in recent drivers (8.0 or later) 
only turns on if the v3 wire protocol is being used. 7.3 servers don't 
support v3, so it's not going to help your particular case.

For a while, the driver would rewrite queries to use DECLARE rather than 
using the v3 protocol facilities, which also works under v2 (but is 
somewhat more fragile). IIRC, this was done in the 7.4 series. So you 
could try an older, 7.4-era, driver and it might do the trick.

-O



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

* Re: Driver compatibility with 7.3 server
  2005-12-22 17:44 Driver compatibility with 7.3 server Mike Charnoky <noky@nextbus.com>
  2005-12-22 21:11 ` Re: Driver compatibility with 7.3 server Oliver Jowett <oliver@opencloud.com>
@ 2005-12-22 21:35   ` Mike Charnoky <noky@nextbus.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Mike Charnoky @ 2005-12-22 21:35 UTC (permalink / raw)
  To: Oliver Jowett <oliver@opencloud.com>; +Cc: pgsql-jdbc

Thank you for the feedback.  I was finally able to get this working
successfully using the 7.4 JDBC driver with the 7.3 server.  The tricky
part I found out was that you have to set autocommit off
(Connection.setAutoCommit(false)).  Once I did so, my memory usage went
down drastically!


Mike

Oliver Jowett wrote:
> Mike Charnoky wrote:
> 
>> Hi everyone, happy holidays!  We are are currently using Postgresql 7.3
>> and would like to be able to use cursors for large selects (ie: using
>> Statement.setFetchSize()).  Unfortunately, this is not implemented in
>> the 7.3 JDBC driver.  Is it possible to use a newer version of the JDBC
>> driver, say 7.4, with the 7.3 version of the db server?  Thanks.
> 
> 
> Later driver versions should work fine with a 7.3 server .. but ..
> 
> The setFetchSize() / cursor support in recent drivers (8.0 or later)
> only turns on if the v3 wire protocol is being used. 7.3 servers don't
> support v3, so it's not going to help your particular case.
> 
> For a while, the driver would rewrite queries to use DECLARE rather than
> using the v3 protocol facilities, which also works under v2 (but is
> somewhat more fragile). IIRC, this was done in the 7.4 series. So you
> could try an older, 7.4-era, driver and it might do the trick.
> 
> -O



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


end of thread, other threads:[~2005-12-22 21:35 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-12-22 17:44 Driver compatibility with 7.3 server Mike Charnoky <noky@nextbus.com>
2005-12-22 17:52 ` Mike Charnoky <noky@nextbus.com>
2005-12-22 21:11 ` Oliver Jowett <oliver@opencloud.com>
2005-12-22 21:35   ` Mike Charnoky <noky@nextbus.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