This is documented in the Developer's Guide (Chapter 4 Frontend/Backend
Protocol of the 7.1 docs).
A few days ago I added this same item the the jdbc todo list. I don't
think the implementation will need to do anything different at the FE/BE
protocol level. Instead my thoughts on this are to wrap all jdbc
Statements/Prepared Statements doing selects in a sql cursor, and then
issuing fetch statements to set sets of rows instead of the entire
Thus 'select foo from bar'
Whould get executed by the driver as:
declare barcursor cursor as select foo from bar;
fetch forward 10 from barcursor;
(to select the first 10 rows)
additional fetches as needed...
Just when this should be done (i.e. you probably don't want to overhead
of using a cursor for every select statement), how many rows to fetch at
a time (perhaps you might want to fetch 100 rows per call to minimize
network roundtrips) would need to be configurable somehow.
Also not the the jdbc2 spec has methods for setCursorName(), etc. and
just how they would play into this I don't know.
Dave Cramer wrote:
> I am looking at changing the jdbc driver to be asynchronous, in other
> words retrieve the result set when asked as opposed to retrieving it all
> before returning.
> This will involve understanding the client/backend protocol completely.
> So far I have found one reference to this. Does anyone have a flow chart
> or can point me to any other references.
In response to
pgsql-hackers by date
|Next:||From: Peter Harvey||Date: 2001-11-06 03:47:45|
|Subject: Re: compiler warnings in ODBC|
|Previous:||From: Vince Vielhaber||Date: 2001-11-06 03:03:45|
|Subject: Re: Beta going well |
pgsql-committers by date
|Next:||From: thomas||Date: 2001-11-06 16:27:32|
|Subject: pgsql/src/include/utils cash.h|
|Previous:||From: tgl||Date: 2001-11-06 01:15:29|
|Subject: pgsql/src/backend/utils/misc ps_status.c|
pgsql-jdbc by date
|Next:||From: Barry Lind||Date: 2001-11-06 04:54:37|
|Subject: Re: |
|Previous:||From: Barry Lind||Date: 2001-11-06 02:58:04|
|Subject: Re: Encoding weirdness with JDBC, driver crashing?|