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

From Bruce Momjian
Subject Re: Proposed patch - psql wraps at window width
Date
Msg-id 200804290311.m3T3Bo606944@momjian.us
Whole thread Raw
In response to Re: Proposed patch - psql wraps at window width  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: Proposed patch - psql wraps at window width  (Gregory Stark <stark@enterprisedb.com>)
Re: Proposed patch - psql wraps at window width  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Gregory Stark wrote:
> > Now, we could get fancy and honor $COLUMNS only in non-interactive mode,
> > but that seems confusing.
> 
> We could always read COLUMNS early on before readline is initialized and stash
> the value away in a variable. But...
> 
> We would only look at COLUMNS if the ioctl for window size failed. Does
> psql/readline do anything to COLUMNS in that case?

We do look at COLUMNS if the ioctl() fails, but not for file/pipe
output.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: Proposed patch - psql wraps at window width
Next
From: Gregory Stark
Date:
Subject: Re: Proposed patch - psql wraps at window width