Chris <dmagick@gmail.com> writes:
> Their docs explain it:
> http://dev.mysql.com/doc/refman/4.1/en/information-functions.html
> See "FOUND_ROWS()"
Sounds like a pretty ugly crock ...
The functionality as described is to let you fetch only the first N
rows, and then still find out the total number of rows that could have
been returned. You can do that in Postgres with a cursor:
DECLARE c CURSOR FOR SELECT ... (no LIMIT here);
FETCH n FROM c;
MOVE FORWARD ALL IN c;
-- then figure the sum of the number of rows fetched and the
-- rows-moved count reported by MOVE
regards, tom lane