Re: proposal: alternative psql commands quit and exit - Mailing list pgsql-hackers

From Geoff Winkless
Subject Re: proposal: alternative psql commands quit and exit
Date
Msg-id CAEzk6ffPJdsjY2wsrFiSPQLq+vy6t=DZ89g_bp==KJXY1SF9FA@mail.gmail.com
Whole thread Raw
In response to Re: proposal: alternative psql commands quit and exit  (Geoff Winkless <pgsqladmin@geoff.dj>)
List pgsql-hackers
On 17 January 2018 at 15:00, I wrote:
> Ctrl-C quits immediately for me no matter what input stage I'm at in
> Windows' psql. Ctrl-Z (DOS EOF) only quits after enter is pressed and
> only at beginning-of-line, so I'd say suggesting the user uses Ctrl-C
> in windows makes sense. ^D doesn't appear to be a special character at
> all.

My suggestion would be that, since the user has just typed exit<CR> or quit<CR> then writing (on *nix) "Press [[EOFKEY]] on a blank input line to exit" (where [[EOFKEY]] is taken from tcgetattr()'s VEOF value) is sufficient, because the user will already have a blank line in front of them so the immediate instruction ("Press Ctrl-D") will work and if they bother to read further they will remember the further instruction for next time; the simpler "Press Ctrl-C to exit" should be sufficient for Windows.

Geoff

pgsql-hackers by date:

Previous
From: Ildar Musin
Date:
Subject: Re: General purpose hashing func in pgbench
Next
From: Peter Geoghegan
Date:
Subject: Re: PostgreSQL crashes with SIGSEGV