Re: psql misbehaves because of a simple typo

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: psql misbehaves because of a simple typo
Дата
Msg-id 28751.1009514007@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: psql misbehaves because of a simple typo  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: psql misbehaves because of a simple typo  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: psql misbehaves because of a simple typo  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> OK, so what do we want to do?  Clearing the buffer on a any backslash
> command is clearly not what we want to do.  Should we clear the buffer
> on a backslash command _only_ if the number of paren's is not even?  If
> we don't clear the counter on a backslash command with uneven parens, do
> we risk trapping people in psql?

"Trap"?  AFAIK \q works in any case.

\r should reset both the buffer and the counter, and seems to do so,
though I'm not quite seeing where it manages to accomplish the latter
(command.c only resets query_buf).  \e should probably provoke a
recomputation of paren_level after the edit occurs.  Offhand I do not
think that any other backslash commands should reset either the buffer
or the counter.  Peter, your thoughts?
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: psql misbehaves because of a simple typo
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: psql misbehaves because of a simple typo