Cloud
pg_size_pretty
The pg_size_pretty() is a database object management function that converts sizes in bytes into a human-readable format.
Examples
SELECT pg_size_pretty(100);
pg_size_pretty
----------------
100 bytes
(1 row)
SELECT pg_size_pretty(1000000);
pg_size_pretty
----------------
977 kB
(1 row)
Was this helpful?