Re: External psql editor - Mailing list pgsql-general

From David G. Johnston
Subject Re: External psql editor
Date
Msg-id CAKFQuwYvgVPfq1BT7oY4mmRjcFo-R9L4fZvzgOQ=bogRzHDTNA@mail.gmail.com
Whole thread Raw
In response to Re: External psql editor  (Rich Shepard <rshepard@appl-ecosys.com>)
Responses Re: External psql editor  (Rich Shepard <rshepard@appl-ecosys.com>)
List pgsql-general
On Fri, Apr 29, 2022 at 1:17 PM Rich Shepard <rshepard@appl-ecosys.com> wrote:
On Fri, 29 Apr 2022, Jan Wieck wrote:

> Did you hit Enter after \e ?

Jan,

Yes. For example, I put a previous command at the prompt to be modified. It
began with 'insert ...' so I added an initial \e to the command. psql told
me that \einsert is not a valid command after I pressed the [Enter] key.

You type "insert", realize you want an editor for this, hit enter (multi-line mode is psql), type \e, hit enter again, your editor appears with "insert" already in place from the query buffer.  Upon returning you are given a new buffer with the contents of whatever you typed into the editor pasted in.
David J.

pgsql-general by date:

Previous
From: "Peter J. Holzer"
Date:
Subject: Re: Replication with Patroni not working after killing secondary and starting again
Next
From: Rich Shepard
Date:
Subject: Re: External psql editor