#List all tables from a PostgreSQL database
If you have many schemas in your database, it can be tedious to search for a specific table across all schemas.
Below is a query to get a list of all tables names, along with their schema names. It works at least for PostgreSQL and Redshift.
SELECT table_schema, table_name
FROM information_schema.tables
ORDER BY 1,2