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 200804240434.m3O4Ykg14302@momjian.us
Whole thread Raw
In response to Re: Proposed patch - psql wraps at window width  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: Proposed patch - psql wraps at window width
List pgsql-hackers
Gregory Stark wrote:
> "Bruce Momjian" <bruce@momjian.us> writes:
> 
> > Brendan Jurd wrote:
> >> To me, this message sounds like you're setting the width of a single
> >> column, when in fact you're setting the target *total* width of the
> >> table.  I think this message would be more clear if it read "Target
> >> output width ..." or "Target table width ...".  Also, as far as the
> >> user is concerned the format is referred to as  "wrapped", not "wrap".
> >
> > Good point.  I have updated the text to be:
> >
> >     test=> \pset columns 70
> >     Target width of file and pipe output for "wrap" format is 70.
> 
> I think "file and pipe output" is short-sighted. There are lots more cases
> this is necessary including SSH sessions and emacs shell buffers, etc. And as
> I pointed out there are often cases where the user may want to override the
> terminal width in any case.
> 
> Earlier I suggested -- and nobody refuted -- that we should follow the
> precedents of ls and man and other tools which need to find the terminal
> width: Explicitly set width takes precedence always, if it's not explicitly
> set then you use the ioctl, and if that fails then you use the COLUMNS
> environment variable.

Yes, I like that better.  Patch updated, same URL:
ftp://momjian.us/pub/postgresql/mypatches/wrap

--  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: Ron Mayer
Date:
Subject: Re: Per-table random_page_cost for tables that we know are always cached
Next
From: Teodor Sigaev
Date:
Subject: Re: Index AM change proposals, redux