xxxxxxxxxx
SELECT table_name
FROM information_schema.tables
WHERE table_schema='public'
AND table_type='BASE TABLE';
xxxxxxxxxx
SELECT *
FROM pg_catalog.pg_tables
WHERE schemaname != 'pg_catalog' AND
schemaname != 'information_schema';Code language: SQL (Structured Query Language) (sql)
xxxxxxxxxx
\c database_name -> to select the database
\dt -> to show the tables in the current database
xxxxxxxxxx
SELECT *
FROM pg_catalog.pg_tables
WHERE schemaname != 'pg_catalog' AND
schemaname != 'information_schema';
Code language: SQL (Structured Query Language) (sql)