How to exit from PostgreSQL command line utility: psql
The \q and press ENTER to quit psql.They keyword “quit” and “exit” the Postgre SQL command-line interface have been included to easier to command-line tool.
The sequence of usual key is:
Alt + Tab
In veterans of the psql command line usually shorten so use the following:
Using this Ctrl+D is use to exit the psql console.