1

After my computer upgraded from Mac Sierra to High Sierra, my psql started exhibiting an annoying behaviour. Sometimes when it lists rows, it prints (END) instead of the prompt, and I have to press any button to stop go out of the display and get the prompt. It doesn't happen for every query, but it's not easy to predict when it happens. Sometimes it puts an (END) after 2 rows, but not after 15 rows.

What controls these aspects of psql, and how can I control it and turn it off? It's annoying that I have press a key for every query I run, or it swallows the first character and make me write "elect * from".

Additional input

It seems to trigger when the display of the rows is wider than the terminal window - i.e. it flows over multiple lines. I use the normal, built-in Terminal app for Mac.

5

The (END) is the mark by your pager (more or less). Turn it off using

\pset pager off

inside psql. I can imagine you had a ~/.psqlrc file earlier that had this line in it, or the default behaviour changed otherwise. Just add the above command to this file to return to the desired behaviour.

Scroll down to 'Files' on the documentation page for more details about what can be done using this file.

  • Thanks. I have never had pager settings in the .psqlrc file, only setting NULL display and turning on timing. I guess it's a change in default PAGER between the Mac OS versions. I will turn it off in my file. – thomjah Apr 23 '18 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.