My database has 50+ schemas. Each schema has around 100 tables and some views.
I want a query that tells me the schema name, table name, and total number of rows in each table. The below query:
select table_schema, table_name, table_type, count(*)
from information_schema.tables
group by table_schema, table_name, table_type
...gives the total number of tables with each name, rather than giving the row count. I am using pgAdmin 3 version 1.10
SELECT COUNT(*) FROM tablename. Unless PostgreSQL stores row counts externally somewhere, you will probably need to use dynamic SQL: generate aSELECT COUNT(*) FROM...query for every table of every schema listed ininformation_schema.tablesand then execute the resulting script.