xxxxxxxxxx
SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public'
AND table_type = 'BASE TABLE';
First, choose your database
\c database_name
Then, this shows all tables in the current schema:
\dt
xxxxxxxxxx
SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public'
AND table_type = 'BASE TABLE';
xxxxxxxxxx
\c database_name -> to select the database
\dt -> to show the tables in the current database