You can directly enter Posgtgresql.
type heroku pg:psql .
But you should also have postgres on your local system, so you can use pgsql (which is the command line interface for pg.)
If you do not know what the db name is, enter \l in pgsql to display the databases. (postgres, template0, and template1 are system databases for each installation.)
Then SELECT pg_size_pretty(pg_database_size('dbname'));
nate since Nov 18 '10 at 23:30 2010-11-18 23:30
source share