How to control psql displaying rows with (END)? 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.
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.