Robert, * Robert Haas (robertmh...@gmail.com) wrote: > On Mon, Jan 15, 2018 at 7:28 AM, Laurenz Albe <laurenz.a...@cybertec.at> > wrote: > > Everaldo Canuto wrote: > >> Also I don't see a consensus on this thread and I don't understand how > >> decisions are taken. > > > > It's just difficult to find consensus with many people. > > > > There were several valid concerns with this, the most striking (to me) > > was Tome's concern that there are perfectly valid multi-line SQL statements > > where a line could start with "exit" or "quit". > > > > Robert Haas had an idea how to provide useful hints without breaking > > anything, > > but it seemed a little complicated. > > It's not really that complicated. Here's a patch. This follows what > Tom suggested in http://postgr.es/m/30157.1513058...@sss.pgh.pa.us and > what I suggested in > https://www.postgresql.org/message-id/CA%2BTgmoZswp00PtcgPfQ9zbbh7HUTgsLLJ9Z1x9E2s8Y7ep048g%40mail.gmail.com > > I've discovered one thing about this design that is not so good, which > is that if you open a single, double, or dollar quote, then the > instructions that are provided under that design do not work: > > rhaas=# select $$ > rhaas$# quit > Use \q to quit or press control-C to clear the input buffer. > rhaas$# \q > rhaas$# well this sucks > rhaas$#
> Obviously this leaves something to be desired, but I think it's > probably just a matter of rephrasing the hint somehow. I didn't have > a good idea off-hand though, so here's the patch as I have it. Well, control-C would still work in that case, so I'm not sure that it's so bad. It's certainly better than what we have now. I would have thought to include a hint to use \? for help too but it might make the hint too long. How about putting control-C first, like this?: Press control-C to abort a command, \q to quit, or \? for help Thanks! Stephen
signature.asc
Description: PGP signature