Re: Proposed patch - psql wraps at window width

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
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:38:14
Message-ID: 200804242038.m3OKcEP23033@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-04-24 21:22:48 Re: Standard metadata queries
Previous Message Alvaro Herrera 2008-04-24 20:37:22 Re: Proposed patch - psql wraps at window width

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2008-04-24 20:48:47 Re: ADD COLUMN with PRIMARY KEY bug (was: I think this is a BUG?)
Previous Message Alvaro Herrera 2008-04-24 20:37:22 Re: Proposed patch - psql wraps at window width