Exit editor without exiting psql

271 Views Asked by At

When I run \dt (and other commands of psql like \l) this thing appears. What is this? Is this an editor?

Most importantly, when I click Ctrl+Z, I get thrown out of psql completely. How do I exit it without exiting psql?

enter image description here

I am totally new to Ubuntu, so sorry if its a dumb question. Thanks for your time on advance!

1

There are 1 best solutions below

0
On

You seem to come from Windows.

The pager that gets invoked whenever a query result does not fit on your screen is something similar to Windows' more, so you exit it by typing q.

If you don't want a pager at all, set the environment variable PAGER to an empty string:

PAGER='' psql

Typing Ctrl+Z will not send an End-of-file on Linux, it will suspend the current foreground process, which continues to lurk in the background. You can rescue it from there with the command fg.