On windows psql shell, pressing ctrl+c exits psql completely whereas sources say that its supposed to quit only the current query line that is it should go from postgres-# to postgres=#. And ctrl+l doesnt clear the page instead types ^L.
Why is this happening and how to fix it. I've tried on cmd, git bash, and psql shell.
Ctrl+C is handled differently by the Windows operating system than in a Linux shell.
As a workaround, I recommend resetting the query buffer with the meta-command \r
. That is not a perfect replacement, because it does not work in the middle of a string constant (prompt ='>
) and it won't cancel the running statement, but it is the best you can get on Windows.