By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,347 Members | 2,120 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,347 IT Pros & Developers. It's quick & easy.

Size of the database

P: 44
Hey,

Im using postgresql 8.3 and i need to know the size of a database in disk. How do i do that?

Regards
Mar 14 '08 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 700
Like that
Expand|Select|Wrap|Line Numbers
  1. select  pg_database_size('database_name');
  2.  
or for pretty print
Expand|Select|Wrap|Line Numbers
  1. select  pg_size_pretty(pg_database_size('database_name'));
  2.  
Mar 14 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.