> For the complete documentation index, see [llms.txt](https://til.duyet.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://til.duyet.net/db/aws-redshift-postgres/postgres-list-tables.md).

# Postgres - List tables

### Using psql

```bash
\dt
```

```bash
# \dt
             List of relations
 Schema |     Name      | Type  |  Owner
--------+---------------+-------+----------
 public | actor         | table | postgres
 public | address       | table | postgres
 public | category      | table | postgres
 ....
```

### Using pg\_catalog schema

```sql
SELECT
   *
FROM
   pg_catalog.pg_tables
WHERE
   schemaname != 'pg_catalog'
AND schemaname != 'information_schema';
```

Reference:

* <http://www.postgresqltutorial.com/postgresql-show-tables/>
