Re: How to get total number of rows when using LIMIT/OFFSET? - Mailing list pgsql-sql

From Bruce Momjian
Subject Re: How to get total number of rows when using LIMIT/OFFSET?
Date
Msg-id 200207110150.g6B1ojh18807@candle.pha.pa.us
Whole thread Raw
In response to How to get total number of rows when using LIMIT/OFFSET?  (Dirk Lutzebaeck <lutzeb@aeccom.com>)
List pgsql-sql
Dirk Lutzebaeck wrote:
> 
> Hello,
> 
> when using LIMIT/OFFSET is it possible to get also the total number of rows
> besides the actual number of rows of the select? It should be there
> because the whole list is ordered anyhow. I'm using 7.2.1.

No way to do that.  Perhaps a CURSOR and look at the total count.  Not
sure if that works but I think it should.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-sql by date:

Previous
From: "David Durst"
Date:
Subject: Returning rows from functions
Next
From: Bruce Momjian
Date:
Subject: Re: pg_restore cannot restore index