Skip to content

Instantly share code, notes, and snippets.

@Teketel
Created November 12, 2018 12:03
Show Gist options
  • Save Teketel/8ce53daf1005b4392d65918f1e6b906a to your computer and use it in GitHub Desktop.
Save Teketel/8ce53daf1005b4392d65918f1e6b906a to your computer and use it in GitHub Desktop.
SELECT pg_database.datname as "database_name", pg_size_pretty(pg_database_size(pg_database.datname)) AS size_in_mb FROM pg_database ORDER by size_in_mb DESC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment