PostgreSQL – Get Total Number of Tables

databasepostgresqlpostgresql-8.4

Is there any way by which I can get the total number of tables in a Postgresql database? The postgresql version I'm using is PostgreSQL 8.4.14.

Best Answer

select count(*)
from information_schema.tables;

Or if you want to find the number of tables only for a specific schema:

select count(*)
from information_schema.tables
where table_schema = 'public';
Related Question