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 3209109.1631040651@sss.pgh.pa.us
обсуждение исходный текст
Ответ на 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  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> On 2021-Sep-06, Laurenz Albe wrote:
>> I agree with Greg that the current behavior is annoying and would
>> welcome the change.  This has bothered me before.

> It has bothered me too.

I'm not here to claim that the current behavior is perfect.  However,
AFAICT the patch as-presented breaks the principle that text goes into
the history at the moment it's sent to the server.  In particular, we
might make an entry for text that *never* got to the server because you
cleared the buffer instead.  I don't find that to be an improvement.
It breaks one of the primary use-cases for history, ie keeping a record
of what you did.

We could perhaps finesse that point by deciding that comment lines
that are handled this way will never be sent to the server --- but
I'm sure people will complain about that, too.  I've definitely heard
people complain because "--" comments are stripped from what's sent
(so I'd look favorably on a patch to undo that).

I think the questions around empty-line handling are largely
orthogonal to this, and we'll just confuse ourselves if we
discuss that at the same time.  Likewise for M-#.

            regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: CI/windows docker vs "am a service" autodetection on windows
Следующее
От: Andres Freund
Дата:
Сообщение: Re: CI/windows docker vs "am a service" autodetection on windows