- PostgreSQL 10 Administration Cookbook
- Simon Riggs Gianni Ciolli
- 109字
- 2021-06-25 22:03:58
How to do it...
From any interface, type the following SQL command:
SELECT count(*) FROM information_schema.tables
WHERE table_schema NOT IN ('information_schema',
'pg_catalog');
You can also look at the list of tables directly, and judge whether the list is a small or large number.
In psql, you can see your own tables by using the following command:
postgres@ebony:~/10.2/main$ psql -c "\d"
List of relations
Schema | Name | Type | Owner
--------+----------+-------+----------
public | accounts | table | postgres
public | branches | table | postgres
In pgAdmin 4, you can see the tables in the tree view on the left-hand side, as shown in the following screenshot: