Skip to content

Instantly share code, notes, and snippets.

@demimismo
Created January 10, 2013 16:33
Show Gist options
  • Save demimismo/4503527 to your computer and use it in GitHub Desktop.
Save demimismo/4503527 to your computer and use it in GitHub Desktop.
SELECT sum(pg_relation_size(quote_ident(table_name)))
FROM information_schema.tables
WHERE table_catalog = database_name AND table_schema = 'public'
AND table_name != 'spatial_ref_sys' AND table_type = 'BASE TABLE'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment