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 200804242038.m3OKcEP23033@momjian.us
Whole thread Raw
In response to Re: Proposed patch - psql wraps at window width  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera wrote:
> 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?

I don't think Win32 supports it.

--  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: Alvaro Herrera
Date:
Subject: Re: Proposed patch - psql wraps at window width
Next
From: Tom Lane
Date:
Subject: Re: Standard metadata queries