pgsql: psql: treat "--" comments between queries as separate history en

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: psql: treat "--" comments between queries as separate history en
Дата
Msg-id E1msTLm-0007Cj-RE@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
psql: treat "--" comments between queries as separate history entries.

If we've not yet collected any non-whitespace, non-comment token for a
new query, flush the current input line to history before reading
another line.  This aligns psql's history behavior with the observation
that lines containing only comments are generally not thought of as
being part of the next query.  psql's prompting behavior is consistent
with that view, too, since it won't change the prompt until you
enter something that's neither whitespace nor a "--" comment.

Greg Nancarrow, simplified a bit by me

Discussion: https://postgr.es/m/CAJcOf-cAdMVr7azeYR7nWKsNp7qhORzc84rV6d7m7knG5Hrtsw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c2f654930e9f8119b9ed12caab6192d0aafe5ebd

Modified Files
--------------
src/bin/psql/mainloop.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Improve some comments in scanner files
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Avoid leaking memory during large-scale REASSIGN OWNED BY operat