On Mon, 2021-05-10 at 02:03 -0400, Bruce Momjian wrote:
> When using \e in psql, if the buffer is not modified by the editor, ignore 
> the editor contents and leave the buffer unchanged (Laurenz Albe)
> The \ef and \ev commands also now have this behavior. DOCS SAY BUFFER IS 
> CLEARED.

It's a bit more complicated: If you edit the current buffer with \e, the buffer 
is
unchanged if you quit the editor.
However, if you edit the previous statement, a file or the definition of a 
function
or view, the query buffer is cleared if you quit the editor without saving.

Suggested wording:

When editing anything else than the current query buffer with \e, and you quit
the editor, the query buffer is cleared.  This makes the behavior less 
surprising
and prevents the unintended re-execution of the previous statement.

Yours,
Laurenz Albe



Reply via email to