Re: No, pg_size_pretty(numeric) was not such a hot idea

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-hackers@postgresql.org
Date: 2012-10-12T19:17:59Z
Lists: pgsql-hackers
On Wed, Oct 10, 2012 at 2:49 PM, Josh Berkus <josh@agliodbs.com> wrote:
> So, here's a complaint: 9.2 is breaking our code for checking table sizes:
>
> postgres=# select pg_size_pretty(100);
> ERROR:  function pg_size_pretty(integer) is not unique at character 8

You know, if we implemented what Tom proposed here:

http://archives.postgresql.org/pgsql-hackers/2012-08/msg01055.php

...then we probably get away with removing pg_size_pretty(bigint) and
then this would Just Work.  pg_size_pretty(numeric) is doubtless a
little slower than pg_size_pretty(bigint), but I think in practice
nobody's going to care.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company