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".
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.