All command can be followed by “mask” to show only some objects.

  • tablespaces:
    • list all tablespaces with sizes: \db+
  • ┬ádatabases:
    • connect to some database: \c dbname
    • list all: \l+
  • schemas:
    • \dn+
  • users, roles:
    • \dg+
  • extensions:
    • list installed extensions: \dx
    • list objects of installed extensions: \dx+
  • tables:
    • list all: \dt+
  • indexes:
    • list all indexes with sizes: \di+
  • views:
    • list all: \dv+
  • functions:
  • sequences:
    • list all: \ds+
  • foreign data wrappers:
    • \dew+
  • foreign users:
    • \deu+
  • foreign tables:
    • list all: \dE+
    • or: \det+
  • foreign servers:
    • \des+