Re: Submitting cursored query support, docs, etc - Mailing list pgadmin-hackers

From Kalle Hallivuori
Subject Re: Submitting cursored query support, docs, etc
Date
Msg-id c637d8bb0712120231o5fce0748ndc164d0579c201e5@mail.gmail.com
Whole thread Raw
In response to Re: Submitting cursored query support, docs, etc  (Dave Page <dpage@postgresql.org>)
List pgadmin-hackers
Hi!

2007/12/11, Dave Page <dpage@postgresql.org>:
> I haven't looked at it in that much detail for a number of years
> unfortunately. However, from the top of my head, I would start by
> looking at ctlSQLResult::Execute/pgQueryThread::execute in which you can
> create the cursor and retrieve the first batch of results.

Yeah, that works fine; I have a button now that declares a cursor for
the user's query, and I can append 'fetch from' manually to actually
see a row :)

> Then, look at
> extending pgSet such that when run with a cursor, an attempt to access a
>  row that hasn't be retrieved yet results in the dataset being extended
> before the value is returned. Currently pgSet is tied to a single
> PGResult, but I guess in cursor mode we would probably need to make that
> a list of PGResults each containing <= N rows where N is a configurable
> batch size.

This is exactly the kind of hint I hoped for. Thanks!

--
Kalle Hallivuori +358-41-5053073 http://korpiq.iki.fi/

pgadmin-hackers by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Foreign key dialog
Next
From: "Dave Page"
Date:
Subject: 1.8.1 timetable