Re: BUG #15002: Unexpected behaviour in psql \r command - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG #15002: Unexpected behaviour in psql \r command
Date
Msg-id CAKFQuwZ+A4PgyfhRLKFc01TzkO--0ka29JumvWhCtzSGmKySBg@mail.gmail.com
Whole thread Raw
In response to BUG #15002: Unexpected behaviour in psql \r command  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #15002: Unexpected behaviour in psql \r command
List pgsql-bugs
On Tue, Jan 9, 2018 at 10:45 AM, PG Bug reporting form <noreply@postgresql.org> wrote:
Previously (at least in 9.6) previous_buf hasn’t been used for any kinds of
\e subcommand.
Now if query_buf is empty previous buffer contents is used.

​IIUC the complaint is that it is no longer possible to use \edit​ to generate a completely empty temporary query that can then be written from scratch.

The v10 behavior is desirable so that leaves either learning a new idiom to accomplish your goal or adding something like "\edit -" to explicitly invoke the desired behavior.

Doing:

# SELECT <enter>
# \edit

Seems reasonably straight forward to get a editor for a newly query instead of the previous one.

David J.

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #15002: Unexpected behaviour in psql \r command
Next
From: Devrim Gündüz
Date:
Subject: Re: missing repodata forhttps://download.postgresql.org/pub/repos/yum/9.6/fedora/fedora-26-x86_64