Re: Proposed patch - psql wraps at window width

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Aidan Van Dyk <aidan(at)highrise(dot)ca>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Gregory Stark <stark(at)enterprisedb(dot)com>, Brendan Jurd <direvus(at)gmail(dot)com>, Bryce Nesbitt <bryce2(at)obviously(dot)com>, heikki(at)enterprisedb(dot)com
Subject: Re: Proposed patch - psql wraps at window width
Date: 2008-04-24 20:37:22
Message-ID: 20080424203722.GO5593@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2008-04-24 20:38:14 Re: Proposed patch - psql wraps at window width
Previous Message Bruce Momjian 2008-04-24 20:36:38 Re: Proposed patch - psql wraps at window width

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2008-04-24 20:38:14 Re: Proposed patch - psql wraps at window width
Previous Message Bruce Momjian 2008-04-24 20:32:17 Re: Proposed patch - psql wraps at window width