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?..
"David G. Johnston" <david.g.johnston@gmail.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
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.