Re: BUG #14287: psql_history gets wiped out

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #14287: psql_history gets wiped out
Дата
Msg-id 29361.1471015852@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #14287: psql_history gets wiped out  (Rick Otten <rotten@windfish.net>)
Список pgsql-bugs
Rick Otten <rotten@windfish.net> writes:
> Wouldn't it be better to write the commands to the history file as you
> go instead of at the end of the session?

No, I wouldn't think so.  That just means you have windows for failure all
the time rather than only at session end.  Keep in mind that the write is
seldom just an append, since the history length is supposed to be bounded.

> At most you would only need to close the file pointer when you tear down
> instead of having to flush the command history (which may be hundreds of
> queries).

The APIs that libreadline and libedit provide for this do not look
anything like what you're assuming here.

            regards, tom lane



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

Предыдущее
От: Rick Otten
Дата:
Сообщение: Re: BUG #14287: psql_history gets wiped out
Следующее
От: "Daniel Verite"
Дата:
Сообщение: Re: BUG #14287: psql_history gets wiped out