How to show tables in PostgreSQL
PostgreSQL has no SHOW TABLES. Use these in psql:
\dt -- tables in the search path \dt *.* -- tables in all schemas \dt schema_name.* \l -- list databases \c dbname -- connect to a database
Plain SQL
SELECT table_schema, table_name
FROM information_schema.tables
WHERE table_type = 'BASE TABLE'
AND table_schema NOT IN ('pg_catalog','information_schema');The query works from any client, not only psql.