Re: How to get total number of rows when using LIMIT/OFFSET?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: How to get total number of rows when using LIMIT/OFFSET?
Дата
Msg-id 200207110150.g6B1ojh18807@candle.pha.pa.us
обсуждение исходный текст
Ответ на How to get total number of rows when using LIMIT/OFFSET?  (Dirk Lutzebaeck <lutzeb@aeccom.com>)
Список 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 по дате отправления:

Предыдущее
От: "David Durst"
Дата:
Сообщение: Returning rows from functions
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_restore cannot restore index