Home > Archive > PostgreSQL JDBC > December 2005 > Driver compatibility with 7.3 server









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Driver compatibility with 7.3 server
Mike Charnoky

2005-12-22, 1:23 pm

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

Mike Charnoky

2005-12-22, 1:23 pm

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

http://jdbc.postgresql.org/download...election


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


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Oliver Jowett

2005-12-22, 8:25 pm

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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Mike Charnoky

2005-12-22, 8:25 pm

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:
>
>
>
> 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


---------------------------(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

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com