Rewrite pg_size_pretty() to avoid compiler bug.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 29 Apr 2011 05:44:50 +0000 (01:44 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 29 Apr 2011 05:45:58 +0000 (01:45 -0400)
commitfd2e2d09aa1d5ba198e09e6d936ff1bba7f62895
treee1abc920b5c1b4d948c937de62aa502afdc7f400
parentc49e4ae1f886e74efb4bc94c09b993098232d5f9
Rewrite pg_size_pretty() to avoid compiler bug.

Convert it to use successive shifts right instead of increasing a divisor.
This is probably a tad more efficient than the original coding, and it's
nicer-looking than the previous patch because we don't need a special case
to avoid overflow in the last branch.  But the real reason to do it is to
avoid a Solaris compiler bug, as per results from buildfarm member moa.
src/backend/utils/adt/dbsize.c