Am 23.03.2018 um 01:15 schrieb Justin Pryzby:
> On Sun, Mar 18, 2018 at 01:53:20PM -0500, Justin Pryzby wrote:
>> I wanted to pick this up and finally finish it..
>>
>> Some opened question in my mind:
>>
>> - should we implement real serverside cursors instead? Or is that
off the
>> table for "classic" interface for some reason?
>
> I don't think I initially (7 months ago) realized that I wasa
implementing for
> pg exactly what already exists for pgdb (right?).
pgdb has the concept of cursors since they are part of DBAPI2, but no
real server-side cursors are used under the hood.
See also: http://trac.pygresql.org:8000/pgtracker/ticket/68
Note that libpq doesn't provide direct support for cursors, you must
create them by executing a PL/pgSQL command.
>> - Or should we implement enough of serverside cursors to be sure
of what
>> interfaces to expose (it's easy enough, but want to avoid have
two different
>> interfaces).
> ..and now I'm glad I did, since I think I'd like to propose not
exporting a
> Move() function at all...since the classic interface currently has no
mechanism
> to access a single row :)
>
> The sequence protocol (getitem) will provide that, as a new feature.
And if
> someone wants to access a specific row or range of rows, then can
just loop
> around the needed rows, rather than iterating the query object.
>
> WDYT?
I'd also use the sequence protocol, and we already have a ticket for
that: http://trac.pygresql.org:8000/pgtracker/ticket/48
Currently I have little time but if you want to work on these tickets or
create a proof of concept please go ahead...
-- Christoph
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo.cgi/pygresql