Re: Correct handling of blank/commented lines in PSQL interactive-mode history

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Correct handling of blank/commented lines in PSQL interactive-mode history
Дата
Msg-id 1215841.1638197036@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Correct handling of blank/commented lines in PSQL interactive-mode history  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: Correct handling of blank/commented lines in PSQL interactive-mode history  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Re: Correct handling of blank/commented lines in PSQL interactive-mode history  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-hackers
Laurenz Albe <laurenz.albe@cybertec.at> writes:
> There was one other problem mentioned in the original mail, and that
> seems to be the most serious one to me:
> [ HISTCONTROL behavior ]

The actual behavior of that option (which perhaps isn't adequately
documented) is that it suppresses a history entry if the first
character of the possibly-multi-line entry is a space.  It certainly
can't operate on a per-line basis, or you'd be likely to lose chunks
of a single SQL command, so I think that definition is fine as
it is (ignoring the whole question of whether the feature is sane
at all ... but if you don't think so, why would you use it?)

Greg's patch would fix this specifically by ensuring that the line
with the space and comment is treated as a separate history entry.
So I don't really see that as a separate bug.  Or, if you will,
the fact that people see it as a bug confirms that such a line
should be treated as a separate history entry.

            regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Rationalizing declarations of src/common/ variables
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Can I assume relation would not be invalid during from ExecutorRun to ExecutorEnd