Received: from cr322781-a.ym1.on.wave.home.com (cr322781-a.ym1.on.wave.home.com [24.112.37.89]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eAFHpLs19290; Wed, 15 Nov 2000 12:51:21 -0500 (EST) (envelope-from svanegmond@bang.dhs.org) Received: from svanegmond by cr322781-a.ym1.on.wave.home.com with local (Exim 3.16 #1 (Debian)) id 13w6iK-0006je-00; Wed, 15 Nov 2000 12:51:16 -0500 Date: Wed, 15 Nov 2000 12:51:16 -0500 To: Josh Berkus Cc: sqllist , phpp Subject: Re: Re: [SQL] FTI, paged, ranked searching and efficiency. Message-ID: <20001115125116.A25885@bang.dhs.org> Reply-To: svanegmond@home.com References: <3A36DC72@operamail.com> <3A12C1DA.D296628C@agliodbs.com> <20001115122516.B25685@bang.dhs.org> <3A12C87A.390C6346@agliodbs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3A12C87A.390C6346@agliodbs.com>; from josh@agliodbs.com on Wed, Nov 15, 2000 at 09:31:38AM -0800 From: Stephen van Egmond X-Archive-Number: 200011/19 X-Sequence-Number: 27 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.