Re: proposal: alternative psql commands quit and exit

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: proposal: alternative psql commands quit and exit
Дата
Msg-id 30157.1513058300@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: proposal: alternative psql commands quit and exit  (Craig Ringer <craig@2ndquadrant.com>)
Ответы Re: proposal: alternative psql commands quit and exit  (Craig Ringer <craig@2ndquadrant.com>)
Re: proposal: alternative psql commands quit and exit  (Gasper Zejn <zejn@owca.info>)
Список pgsql-hackers
Craig Ringer <craig@2ndquadrant.com> writes:
> I doubt I've ever written just "exit" or "quit" without indentation. I
> think if it requires them to be a bareword with no indentation, strictly
> ^(exit|quit)\n when isatty, then that's probably a safe and helpful choice.

FWIW, I think that the special behavior (whatever it winds up being
exactly) ought to trigger on an input line matching

    [whitespace]*help[whitespace]*(;[whitespace]*)?

and similarly for exit/quit.  I think that novices might have internalized
enough SQL syntax to think that they need to terminate the command with a
semicolon --- in fact, we regularly see examples in which seasoned users
think they need to terminate backslash commands with a semicolon, so
that's hardly far-fetched.  And we might as well allow as much whitespace
as we can, because nobody but Guido Rossum thinks that having whitespace
be semantically significant is a good idea.

            regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] A design for amcheck heapam verification
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Using ProcSignal to get memory context stats from a running backend