Re: Java GUI development - Mailing list pgsql-jdbc

From Barry Lind
Subject Re: Java GUI development
Date
Msg-id 3CFE6FD8.5020004@xythos.com
Whole thread Raw
In response to Re: Java GUI development  (Bear Giles <bgiles@coyotesong.com>)
List pgsql-jdbc

Dave Cramer wrote:
 > One of the problems the driver has is that it fetches the
> entire query before returning which could be problematic.

One of the features I want to add for 7.3 is the ability to use server
side cursors to allow partial fetches of results.  The default would be
to fetch everything as it does now, but by calling
Statement.setFetchSize() you would enable the new functionality.

So instead of directly issuing the query 'select foo from bar' as the
driver does today, the driver would do the following after a call of
setFetchSize(10):  declare cursor1 cursor for select foo from bar; fetch
forward 10 from cursor1;

only the first 10 rows would be buffered.  Then if more were needed
additional 'fetch forward 10 from cursor1;' calls would be made to get
more rows.

thanks,
--Barry




pgsql-jdbc by date:

Previous
From: "Shmuel A. Kahn"
Date:
Subject: Re: Newbie question - Applet works only in appletviewer
Next
From: Bear Giles
Date:
Subject: Re: Java GUI development