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

From Peter Eisentraut
Subject Re: Proposed patch - psql wraps at window width
Date
Msg-id 200804242223.25671.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  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Bruce Momjian wrote:
> Greg's suggestion is to use $COLUMNS if the width can't be determined
> because the output is not directly to the screen.  $COLUMNS is updated
> by many shells.

I think it is best not to look at $COLUMNS at all.  If the output is to a 
terminal, then use ioctl to query the terminal.  And provide a \pset command 
to set a width explicitly, which can apply in all cases.


pgsql-hackers by date:

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