Josh Berkus (josh@agliodbs.com) wrote:
> Stephen,
>
> > How come nobody's ever thought of cursors?
> >
> > DECLARE foo CURSOR FOR SELECT stuff FROM stuff WHERE foo ORDER BY
> > something;
> >
> > Hop forward N rows?
> > MOVE FORWARD $n IN foo
> >
> > Want M rows?
> > FETCH FORWARD $m IN foo
>
> I'm intrigued by this. How would I retrieve cursor rows into a web
> application? If we could output a cursor to a functon result (we
> can't), it would be easy, but I'm not sure otherwise.
The result of the FETCH is something you can use pg_fetch_* functions
on as usual.