How to get total number of rows when using LIMIT/OFFSET?
How to get total number of rows when using LIMIT/OFFSET?
От:
Dirk Lutzebaeck <lutzeb@aeccom.com>
Дата:
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. Thanks for help, Dirk
Re: How to get total number of rows when using LIMIT/OFFSET?
От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:
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, Pennsylvania 19026