Andy DePue <adepue(at)eworksmart(dot)com> writes:
> Just curious... but often, I have only needed a "fairly" accurate
> count of rows. As in, outside the context of a transaction. In other
> words, how difficult would it be to keep track of the number of fully
> committed and visible rows in a table?
Well, if you run vacuum (or analyze) on a reasonably frequent basis,
seems like pg_class.reltuples would do fine.
regards, tom lane