← All Shortcuts

PostgreSQL (psql) Keyboard Shortcuts & Commands (7)

7 PostgreSQL (psql) shortcuts and commands.

Search all shortcuts interactively

Open Shortcut Finder

All Shortcuts

Commands

ShortcutActionDescription
psql -U user -d dbnameConnectConnect to PostgreSQL.
\\lList DBsList all databases.
\\c [DB]Switch DBSwitch database.
\\dtList tablesList tables.
\\d [table]Table detailShow table structure.
\\qQuitExit psql.
\\i [file]Execute fileExecute an SQL file.