Skip to content
Advertisement

How to list relations in postgres schema

I need help with a pretty basic Postgres command, but I cannot find a reference anywhere. My cluster is set up like this:

database_1
   - schema_1
   - schema_2
        - relation_1
        - relation_2
        - ...
   - relation_3
   - relation_4
   - ...

I know how to list databases (l), and I know how to list relations in the “default” schema (dt). Heck, I can even list schemas (dn), but I cannot, for the life of me, list the relations within a schema.

Halp!

Thanks, Joe


To pre-clarify, what I’m looking for is this:

> c database_1
You are now connected to database_1
> somecommand
relation_1
relation_2
>

Advertisement

Answer

Try this one:

dt schema_2.
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement