Re: Re: [SQL] FTI, paged, ranked searching and efficiency. - Mailing list pgsql-php

From Stephen van Egmond
Subject Re: Re: [SQL] FTI, paged, ranked searching and efficiency.
Date
Msg-id 20001115125116.A25885@bang.dhs.org
Whole thread Raw
In response to Re: Re: [SQL] FTI, paged, ranked searching and efficiency.  (Josh Berkus <josh@agliodbs.com>)
List pgsql-php
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.

pgsql-php by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Re: [SQL] FTI, paged, ranked searching and efficiency.
Next
From: chriswood@wvda.com
Date:
Subject: Question re large objects