Commands I use in psql

Because I don’t quite use psql often enough to remember:

  • \dn — list schemas.

  • \dt schema.* — list tables in the schema.

  • \d schema.* — list tables, indexes in the schema in copious detail.

  • \d table — describe a table and constraints.