Find the row count for all tables in Postgres

via https://stackoverflow.com/a/2611745 total count 1 2 3 4 5 6 7 SELECT sum(reltuples) FROM pg_class C LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) WHERE nspname NOT IN ('pg_catalog', 'information_schema') AND relkind='r'; summary details 1 2 3 4 5 6 7 8 SELECT nspname AS schemaname,relname,reltuples FROM pg_class C LEFT JOIN pg_namespace N ON (N.