SELECT table_schema, table_name, data_length, index_length FROM information_schema.tables
SELECT pg_size_pretty( pg_total_relation_size('tablename') ); (postgres)