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