Re: Proposed patch - psql wraps at window width

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Aidan Van Dyk <aidan(at)highrise(dot)ca>
Cc: 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>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, 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 19:22:16
Message-ID: 200804241922.m3OJMGV00885@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Aidan Van Dyk wrote:
-- Start of PGP signed section.
> * Bruce Momjian <bruce(at)momjian(dot)us> [080424 14:37]:
>
> > I am confused exactly what people want changed in the patch. Some want
> > no control over wrapping in file output, and others want $COLUMN to
> > control column file output. The only person I am seeing code from is
> > Greg Stark, but I think most don't want his changes.
>
> If I had to vote as as user, Greg's suggestion made the most sense to
> me. It was a simple approach that I could easily understand, and easily
> envision using with and without a pager.
>
> But basically, I pretty much *always* use a pager, having settled on
> comfortable $LESS.
>
> That said, I really don't see myself using the wrapped format so maybe
> my vote shouldn't count.

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.

The arguments I have heard are:

o wrapped never affects file/pipe output
o wrapped to file/pipe controlled only by \pset columns
o wrapped to file/pipe controlled by $COLUMNS
o wrapped to file/pipe controlled by \pset columns or $COLUMNS

--
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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2008-04-24 19:28:19 Re: MERGE Specification
Previous Message Gregory Stark 2008-04-24 18:58:20 Re: Proposed patch - psql wraps at window width

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2008-04-24 19:52:10 Re: Proposed patch - psql wraps at window width
Previous Message Alvaro Herrera 2008-04-24 19:21:05 Re: BUG #4128: The postmaster.opts.default file is begin ignored