Re: Getting psql to redisplay command after \e
Laurenz Albe <laurenz.albe@cybertec.at>
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@lists.postgresql.org
Date: 2019-10-29T21:05:34Z
Lists: pgsql-hackers
On Mon, 2019-10-28 at 23:00 -0400, Tom Lane wrote: > The attached patch teaches psql to redisplay any not-yet-executed > query text after editing with \e. The fact that you don't get to > see what you're about to execute has been complained of before, > most recently at bug #16034 [1]. In that thread I complained that > we needed some probably-not-very-portable readline functionality > to make this work. However, after experimenting with trying to > shove text back into readline's buffer, I realized that there's > not really any need to do that: we just need to print the waiting > text and then collect another line. (As a bonus, it works the > same even if you turned off readline with -n.) This is a nice improvement. I tried to torture it with a hex editor, but couldn't get it to break. There were some weird carriage returns in the patch, but after I removed them, it applied fine. Yours, Laurenz Albe
Commits
-
Make psql redisplay the query buffer after \e.
- d1c866e57f11 13.0 landed