Bruce Momjian 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
> > $ 

BTW, I've missed that Ctrl+D behavior also depends on IGNOREEOF.

From https://www.postgresql.org/docs/current/static/app-psql.html

IGNOREEOF

    If set to 1 or less, sending an EOF character (usually Control+D)
    to an interactive session of psql will terminate the
    application. If set to a larger numeric value, that many
    consecutive EOF characters must be typed to make an interactive
    session terminate. If the variable is set to a non-numeric value,
    it is interpreted as 10. The default is 0.


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

Reply via email to