Re: proposal: alternative psql commands quit and exit

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Everaldo Canuto <everaldo(dot)canuto(at)gmail(dot)com>, Daniel Vérité <daniel(at)manitou-mail(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: proposal: alternative psql commands quit and exit
Date: 2017-12-08 15:19:39
Message-ID: 9651.1512746379@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> I'll agree that exiting the program is a special case that merits
> consideration - and it has been given that in the form of the concession to
> the word "help" in order to get the reader unfamiliar with our backslash
> prefix a non-backslash way to obtain that knowledge apart from reading our
> docs. Under that premise I would accept (lacking compelling arguments for
> why its a bad idea) this proposal for quit/exit but am against anything
> beyond that.

Meh. I never thought that the "help" business was particularly well
thought out, and this proposal isn't better. The reason is that to
avoid breaking multi-line SQL command entry, we can only accept such
a command when the input buffer is empty. A psql novice is unlikely
to be familiar with that concept, let alone know that \r or ^C is the
way to get there. There's a weak argument that "help" is of some
value because it's likely to be the first thing a novice types, but
that doesn't apply for quit/exit. The typical interaction I'd foresee
is more like

postgres=> select 2+2 (user forgets semicolon)
postgres-> help
postgres-> quit
postgres-> exit

with nothing accomplished except to increase the user's frustration
each time. Eventually she'll hit on ^D and get out of it, but none
of these allegedly novice-friendly "features" helped at all.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeremy Finzel 2017-12-08 15:20:49 Re: How to use set/reset role in contrib_regression test?
Previous Message David G. Johnston 2017-12-08 15:17:28 Re: proposal: alternative psql commands quit and exit