How to exit from PostgreSQL command line utility: psql

前端 未结 9 1233
小鲜肉
小鲜肉 2020-12-02 03:22

What command or short key can I use to exit the PostgreSQL command line utility psql?

9条回答
  •  粉色の甜心
    2020-12-02 04:04

    Specifically speaking, how to exit from the following status on Ubuntu 18.04.

    I put the original status as follows.

    postgres@user:~$
    

    If psql is inputed, it changes to the new status as follows.

    postgres@user:~$ psql
    
    postgres=# 
    

    If \q is inputed, please see the operation.

    postgres@user:~$ \q
    

    It changes to the original status as follows.

    postgres@user:~$
    

    The quick way is to kill the terminal. But I want to know other quit method without killing the terminal.

    Thanks,

提交回复
热议问题