From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Emanuel Araújo <eacshm@gmail.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: psql \r changed behavior in pg10
Date: Wed, 22 Jul 2020 20:54:29 -0400
Message-ID: <89919.1595465669@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwa7NwZx0ox0bxxBhJE5C2zGwawfg4c9wGzAXCvtP_kxCA@mail.gmail.com>
References: <CAMuTAkbLxS7McO9P7U=9xr94hM_D+T5VYEgEsMuS5uwrb5N3xA@mail.gmail.com>
<CAKFQuwa7NwZx0ox0bxxBhJE5C2zGwawfg4c9wGzAXCvtP_kxCA@mail.gmail.com>
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Wednesday, July 22, 2020, Emanuel Araújo <eacshm@gmail.com> wrote:
>> \r
>> \e
>> -> Open temp file with the same last command "select 1;"
>> is it right?
> Documentation since v10:
> Or, if the current query buffer is empty, the most recently executed query
> is copied to a temporary file and edited in the same fashion.
There's some discussion around that in this thread:
https://www.postgresql.org/message-id/flat/9b4ea968-753f-4b5f-b46c-d7d3bf7c8f90%40manitou-mail.org
The key point is that \r in this case used to clear the "previous query"
buffer since there was nothing for it to remove from the "current query"
buffer. I argued then that that was confusing and counterproductive,
and I still think that.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, eacshm@gmail.com
Subject: Re: psql \r changed behavior in pg10
In-Reply-To: <89919.1595465669@sss.pgh.pa.us>
References: <CAMuTAkbLxS7McO9P7U=9xr94hM_D+T5VYEgEsMuS5uwrb5N3xA@mail.gmail.com> <CAKFQuwa7NwZx0ox0bxxBhJE5C2zGwawfg4c9wGzAXCvtP_kxCA@mail.gmail.com> <89919.1595465669@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox