Re: proposal: alternative psql commands quit and exit

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "Bruce Momjian" <bruce(at)momjian(dot)us>
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 14:01:30
Message-ID: a10f09cd-3710-48b7-8a8d-e5308599b1a8@manitou-mail.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2018-02-01 14:04:57 Re: [HACKERS] taking stdbool.h into use
Previous Message Andres Freund 2018-02-01 14:01:17 Re: JIT compiling with LLVM v9.0