How to get out of a select in PostgreSQL without exiting to the terminal?

喜夏-厌秋 提交于 2020-01-30 07:51:47

问题


As you see in the image I have listed all the tables in a database...

I can move up and down, but how can I get back to the postgres prompt? If I use CONTROL+X it takes me back to the linux prompt, but out of postgres.

Thank you ALL for your patience with non-programmers!


回答1:


It's less pager, simply type q.




回答2:


https://www.postgresql.org/docs/current/static/app-psql.html

If the environment variable PAGER is set, the output is piped to the specified program. Otherwise a platform-dependent default (such as more) is used

so If you are on linux and did not explicitely change PAGER, tap q

http://man7.org/linux/man-pages/man1/more.1.html

Press space to continue, 'q' to quit.



来源:https://stackoverflow.com/questions/48208275/how-to-get-out-of-a-select-in-postgresql-without-exiting-to-the-terminal

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!