Re: fix for readline terminal size problems when window is resized with open pager

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andreas Karlsson <andreas(at)proxel(dot)se>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: fix for readline terminal size problems when window is resized with open pager
Date: 2015-12-16 16:33:36
Message-ID: 20151216163336.GD23112@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 ... \n
UNION ALL
SELECT 1;Time: 2.311 ms

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-12-16 17:02:26 Re: fix for readline terminal size problems when window is resized with open pager
Previous Message Dilip Kumar 2015-12-16 16:25:05 Re: parallel joins, and better parallel explain