On Thu, Feb 1, 2018 at 12:01:37PM +0100, Daniel Verite wrote: > Also, the fact that Control-D can quit in the middle of a > multiline query without any confirmation is a usability problem, because > you can always fat-finger a Ctrl+key. By comparison, bash doesn't > accept it and emits the same error as if a script was improperly > terminated. Example: > > $ cat ' > > [Hit Ctrl+D here] bash: unexpected EOF while looking for matching `'' > bash: syntax error: unexpected end of file > $
I just researched this. In bash, it seems Ctrl+C and Ctrl+D do kind of the same thing, i.e. exit command: $ echo ' > bash: unexpected EOF while looking for matching `'' bash: syntax error: unexpected end of file $ echo ' > ^C $ so the question is whether it is wise that we have ^C and ^D do different things on psql, or they should do the same thing. I doubt we would want to change ^D, so it would be changing ^C to exit, except we use ^C to cancel a query and return you to a prompt, so I don't see how we can change that either. In summary, we are probably can't improve this. -- Bruce Momjian <br...@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +