\conninfo

Category: Databases & SQL

\conninfo

Show current connection details

Prints the host, port, database, and user of the active session — handy after \c switches. Related: \c otherdb to connect elsewhere.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.