Re: fix for readline terminal size problems when window is resized with open pager - Mailing list pgsql-hackers

From Andres Freund
Subject Re: fix for readline terminal size problems when window is resized with open pager
Date
Msg-id 20151216163336.GD23112@awork2.anarazel.de
Whole thread Raw
In response to Re: fix for readline terminal size problems when window is resized with open pager  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2015-12-16 11:21:53 -0500, Tom Lane wrote:
> It looks to me like what it's doing is repainting the current line
> on the theory that it might be messed up.  Since we are, at this
> point, presumably *not* in the middle of accepting a command line,
> that should be unnecessary but also harmless.  If there is any
> visible difference in behavior, I should think it would be
> rl_resize_terminal() that produces more consistent results, because
> it does have the repaint logic which the other lacks.

The repainting actually causes trouble here, if I have \timing enabled.
Even without an actual resize even it leads to the Time: line to be
displayed in the same line as the query, after the pager was
active. Looks like
postgres[8444][1]=# SELECT * .. \n ... \nUNION ALLSELECT 1;Time: 2.311 ms

So something isn't entirely right after a redraw...



pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: parallel joins, and better parallel explain
Next
From: Tom Lane
Date:
Subject: Re: fix for readline terminal size problems when window is resized with open pager