From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Daniel Verite <daniel(at)manitou-mail(dot)org> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Everaldo Canuto <everaldo(dot)canuto(at)gmail(dot)com>, Chapman Flack <chap(at)anastigmatix(dot)net>, Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: alternative psql commands quit and exit |
Date: | 2018-02-01 13:38:57 |
Message-ID: | 20180201133857.GD20358@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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 <bruce(at)momjian(dot)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 +
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2018-02-01 13:42:35 | Re: JIT compiling with LLVM v9.0 |
Previous Message | Vladimir Sitnikov | 2018-02-01 13:33:42 | Re: Built-in connection pooling |