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

From Alvaro Herrera
Subject Re: Proposed patch - psql wraps at window width
Date
Msg-id 20080424203722.GO5593@alvh.no-ip.org
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>)
Re: Proposed patch - psql wraps at window width  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
Bruce Momjian escribió:
> Peter Eisentraut wrote:
> > 
> > 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.
> 
> Yes, that is pretty much what we have now, except we try for $COLUMNS if
> ioctl() fails for interactive use.

On what platforms does ioctl() fail?

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

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