Re: Proposed patch - psql wraps at window width - Mailing list pgsql-patches

From Peter Eisentraut
Subject Re: Proposed patch - psql wraps at window width
Date
Msg-id 200804171509.25472.peter_e@gmx.net
Whole thread Raw
In response to Re: Proposed patch - psql wraps at window width  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Proposed patch - psql wraps at window width  (Gregory Stark <stark@enterprisedb.com>)
Re: Proposed patch - psql wraps at window width  (Bryce Nesbitt <bryce2@obviously.com>)
Re: Proposed patch - psql wraps at window width  (Bryce Nesbitt <bryce2@obviously.com>)
Re: Proposed patch - psql wraps at window width  (Bryce Nesbitt <bryce2@obviously.com>)
List pgsql-patches
Bruce Momjian wrote:
> I checked the use of COLUMNS and it seems bash updates the environment
> variable when a window is resized.  I added ioctl(TIOCGWINSZ) if COLUMNS
> isn't set.  We already had a call in print.c for detecting the
> number of rows on the screen to determine if the pager should
> be used.  Seems COLUMNS should take precedence over ioctl(), right?

Considering that the code to determine the row count is undisputed so far, the
column count detection should work the same.  That is, we might not need to
look at COLUMNS at all.  Unless there is a use case for overriding the column
count (instead of just turning off the wrapping).

pgsql-patches by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Proposed patch - psql wraps at window width
Next
From: Bruce Momjian
Date:
Subject: Re: Proposed patch - psql wraps at window width