| home | about me | feed RSS feed

-- table names and their owners
  SELECT db.datname, au.rolname
    FROM pg_database db
    JOIN pg_authid au ON db.datdba = au.oid;

-- table size (vacuum regularly!)
  SELECT relname, n_tup_ins - n_tup_del AS ROWCOUNT 
    FROM pg_stat_all_tables 
ORDER BY ROWCOUNT DESC;
tags: postgresql
created: 2010-05-13 | updated: 2011-04-06


Comments are now closed for this post.