Re: Getting psql to redisplay command after \e - Mailing list pgsql-hackers

From Laurenz Albe
Subject Re: Getting psql to redisplay command after \e
Date
Msg-id 6aa5eca2c9f50850012dbb71165ca6fe8e63a86c.camel@cybertec.at
Whole thread Raw
In response to Getting psql to redisplay command after \e  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: RFC: split OBJS lines to one object per line
Next
From: Thomas Munro
Date:
Subject: Re: PL/Python fails on new NetBSD/PPC 8.0 install