Jorge M. Nures
Jorge M. Nures

Reputation: 692

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

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

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!

Upvotes: 5

Views: 3459

Answers (2)

Vao Tsun
Vao Tsun

Reputation: 51456

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.

Upvotes: 1

clemens
clemens

Reputation: 17721

It's less pager, simply type q.

Upvotes: 8

Related Questions