"Greg Sabino Mullane" <greg@turnstep.com> writes:
> Still, it seems that there should be a way to grab the information,
> especially if you have an "ORDER BY" clause in your query - after
> all, that means at some point, postgres knows how many records
> matched before it ORDERS and LIMITS them.
Not necessarily; it could be using an indexscan to do the ordering.
regards, tom lane