How to list all tables in PostgreSQL?

In MySQL, we use SHOW TABLES to view all tables in a database. What’s the equivalent command in PostgreSQL to achieve the same? I’m looking for the correct way to postgres list tables using SQL or psql terminal commands.

Been working with PostgreSQL for over 6 years now, and honestly, for quick lookups during development, I just stay inside the psql terminal and use this:

psql mydb  
\dt

It lists all tables in the current schema, super handy and instant. If I ever need to explore all schemas, then \dt . does the trick. It’s my go-to for a fast postgres list tables check without writing any SQL.

Yeah, I follow a similar approach during quick dev sessions, but when I’m writing scripts or automating checks, I like to make it a bit more robust.

SELECT table_name FROM information_schema.tables  
WHERE table_schema = 'public';

This gives you a clean list of tables from the ‘public’ schema. It’s more portable and ideal when you want to integrate postgres list tables logic into tooling or CI/CD pipelines. You get flexibility and cross-DB compatibility too.

Totally agree with both. I’ve been in multi-tenant environments, so I often go a step further. After connecting with \c, I usually explore schemas first using \dn, then run:

\dt schema_name.*

This is super useful when dealing with custom or isolated schemas. Helps keep things clean when DBs grow complex. Whether I’m debugging or onboarding a new teammate, this layered approach to postgres list tables really helps maintain clarity.