Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

postgres database sizes

/* For multiple databases */
select t1.datname AS db_name,  
       pg_size_pretty(pg_database_size(t1.datname)) as db_size
from pg_database t1
order by pg_database_size(t1.datname) desc;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #postgres #database #sizes
ADD COMMENT
Topic
Name
7+9 =