On 16 January 2018 at 17:20, Robert Haas <robertmh...@gmail.com> wrote:
> (1) I doubt that we want to
> override the user's terminal settings and (2) it won't work on
> non-readline builds.

I'm inclined to agree with (1). (2) is something that could be worked
around with (relatively) small effort, and in theory we could grab the
value for eof from the terminal.

Having said all that, has anyone suggested grabbing and writing out
using the "stty quit" value? That appears to work whatever level
you're at, readline-or-not, mid-line or not. It wasn't even something
I was aware of.

Here my quit value is ^\ (Ctrl-backslash)

~ stty -a | grep quit | sed -e 's/.*quit = \([^;]*\).*/\1/'
^\
~ psql -U postgres
psql (9.5.1)
Type "help" for help.

postgres=# select '
postgres'# ^\Quit
~ psql -U postgres
psql (9.5.1)
Type "help" for help.

postgres=# select $$
postgres$# ^\Quit
~ psql --no-readline -U postgres
psql (9.5.1)
Type "help" for help.

postgres=# select 'Quit

Geoff

Reply via email to