I\'m coming to Postgres from Oracle and looking for a way to find the table and index size in terms of bytes/MB/GB/etc, or even better the size for all tables.
bytes/MB/GB/etc
If the database name is snort, the following sentence give it size:
snort
psql -c "\l+ snort" | awk -F "|" '{print $7}'