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 200804290008.m3T08AQ07976@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  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
Gregory Stark wrote:
> "Bryce Nesbitt" <bryce2@obviously.com> writes:
> 
> > Unless they are in the habit of doing:
> >
> > # COLUMNS=$COLUMNS ls -C |cat
> 
> Some of us are actually in the habit of doing that because it's easier to use
> the standard interface than remembering the different command-line option for
> each command. I quite often do precisely that with dpkg, for example.

Yes, this is true, but it assume the application is not going to set
$COLUMNS itself, like psql does in interactive mode:
test=> \echo `echo $COLUMNS`127
$ sql -c '\echo `echo $COLUMNS`' test(empty)

Now, we could get fancy and honor $COLUMNS only in non-interactive mode,
but that seems confusing.

--  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: Sam Mason
Date:
Subject: Re: Protection from SQL injection
Next
From: Alvaro Herrera
Date:
Subject: Re: [COMMITTERS] pgsql: Add generate_subscripts, a series-generation function which