Re: [PATCH] Add support to psql for edit-and-execute-command

Поиск
Список
Период
Сортировка
От Joe Wildish
Тема Re: [PATCH] Add support to psql for edit-and-execute-command
Дата
Msg-id F322D695-73A0-4318-90FE-CBC2DE5BA907@lateraljoin.com
обсуждение исходный текст
Ответ на Re: [PATCH] Add support to psql for edit-and-execute-command  (Oleksandr Shulgin <oleksandr.shulgin@zalando.de>)
Ответы Re: [PATCH] Add support to psql for edit-and-execute-command  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers

On 18 May 2020, at 7:08, Oleksandr Shulgin wrote:

The only difference from \e is that you don't need to jump to the end of
input first, I guess?

AIUI, \e will edit the last thing in history or a specific line number from history, whereas the patch will allow the current line to be edited. That is 99% of the time what I want.

My work flow is typically "Run some queries" => "Go back to some recent query by searching history, often not the most recent" => "Edit query". To do the edit in an editor (without the patch), I've been deliberately nobbling the query once found from history. This allows it to execute (and fail) but places it as the most recent thing in history. Then I hit "\e".

-Joe

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

Предыдущее
От: Etsuro Fujita
Дата:
Сообщение: Re: Optimizer docs typos
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: [PATCH] Add support to psql for edit-and-execute-command