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