pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rich Shepard <rshepard@appl-ecosys.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: External psql editor
Date: Fri, 29 Apr 2022 10:13:09 -0700 (PDT)
Message-ID: <89e71248-2fa8-c6ee-9546-93286947ed3b@appl-ecosys.com> (raw)
In-Reply-To: <7fef2d5f-6698-0bb5-11fe-ffd042a24ab1@wi3ck.info>
References: <edf1cfa4-35bf-66bf-4de2-7a3bbcb6c5e4@appl-ecosys.com>
	<7fef2d5f-6698-0bb5-11fe-ffd042a24ab1@wi3ck.info>

On Fri, 29 Apr 2022, Jan Wieck wrote:

> What you are missing is that even though the PSQL_EDITOR env variable is
> set, psql itself doesn't emulate that editor's behavior natively. You need
> to actually launch the editor (possibly while having a partial query in
> the buffer) with the \e command.

Jan,

Ah! That wasn't mentioned in the thread I read.

> While in psql, type \e and Enter. You will have the current query buffer
> in the editor. You can do this at the end of a partial (not yet semicolon
> terminated) query.

Can I set it before entering any command or better yet, when I invoke psql?

Thanks very much,

Rich





view thread (26+ messages)  latest in thread

Message-ID: <89e71248-2fa8-c6ee-9546-93286947ed3b@appl-ecosys.com>
Permalink:  ../89e71248-2fa8-c6ee-9546-93286947ed3b@appl-ecosys.com/
Also on:    postgresql.org/message-id/89e71248-2fa8-c6ee-9546-93286947ed3b@appl-ecosys.com

 · 

reply

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: rshepard@appl-ecosys.com
  Subject: Re: External psql editor
  In-Reply-To: <89e71248-2fa8-c6ee-9546-93286947ed3b@appl-ecosys.com>
  References: <edf1cfa4-35bf-66bf-4de2-7a3bbcb6c5e4@appl-ecosys.com> <7fef2d5f-6698-0bb5-11fe-ffd042a24ab1@wi3ck.info> <89e71248-2fa8-c6ee-9546-93286947ed3b@appl-ecosys.com>

* 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