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

From Daniel Verite
Subject Re: proposal: alternative psql commands quit and exit
Date
Msg-id 7a459a76-2fef-4a63-b310-d2f7d9152345@manitou-mail.org
Whole thread Raw
In response to Re: proposal: alternative psql commands quit and exit  (Bruce Momjian <bruce@momjian.us>)
Responses Re: proposal: alternative psql commands quit and exit  (Bruce Momjian <bruce@momjian.us>)
Re: proposal: alternative psql commands quit and exit  (Bruce Momjian <bruce@momjian.us>)
Re: proposal: alternative psql commands quit and exit  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
    Bruce Momjian wrote:

> One open issue is the existing help display is inaccurate on Windows:
>
>         Use \\? for help or press control-C to clear the input buffer.

! #ifndef WIN32
!   puts(_("Use control-D to quit."));
! #else
!   puts(_("Use control-C to quit."));
! #endif

But Control-C exiting on Windows is a bug, isn't it?
Shouldn't we try to fix it to behave like in Unix
rather than documenting it?

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
$

There's also the issue that, in general, communicating different hints
and advice depending on the host operating system is not ideal.
Because people ask "how do I do such and such in psql?",
they do not ask "how do I do such and such in psql in Windows?".


Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite


pgsql-hackers by date:

Previous
From: Rajkumar Raghuwanshi
Date:
Subject: Query running for very long time (server hanged) with parallel append
Next
From: Simon Riggs
Date:
Subject: Re: [HACKERS] MERGE SQL Statement for PG11