Search Postgresql Archives

Re: Proposition fetch cursors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 14 Jun 2011 20:49:48 +0800, Craig Ringer wrote:
On 06/14/2011 04:30 PM, RadosÅaw Smogura wrote:
Hello,

I have proposition about one missing feature for cursors. Actually there is no support for fetching some data from cursor without moving it (in context of external applications). This could be nice if driver could
fetch e.g. 100 rows, buffer it internally and then move cursor at
desired position in order to update data. I think this is known approach
in databases.

Interesting.

Do you want this only for scrollable cursors? Or do you want/need to
be able to "peek" ahead into the results of a non-scrollable cursor
too?

What's your use case?

--
Craig Ringer

Actually for "for update" cursors (so for all non-scrollable). With scrollable I can move backward and forward simulating fetches, but for update it's small pain, as in order to update n-th row (I doesn't know at begin that this is n-th row) I should ask n-times to get this row, moving forward one-by-one - adding network "overhead". With fetches I can ask to fetch 100 rows from current position, process it on my side, and then decide where to move cursor (eventually to update data).

Regards,
Radek

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux