Re: proposal: alternative psql commands quit and exit

From: Vladimir Svedov <vodevsh(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, 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 16:26:46
Message-ID: CADqDLE-hgRA0qLeiC3a3DJ41-yR5kj=k0o679K=zk32VLzaB1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wonder if *exit;* to terminate loop be confused with exit psql in case of
bad syntax. then instead of reporting error in plpgsql it would just
silently exit?..

2017-12-08 15:19 GMT+00:00 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:

> "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 Everaldo Canuto 2017-12-08 16:32:08 Re: proposal: alternative psql commands quit and exit
Previous Message Peter Eisentraut 2017-12-08 16:25:07 Re: [HACKERS] What does it mean by XLOG_BACKUP_RECORD?