Re: Proposed patch - psql wraps at window width

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Brendan Jurd" <direvus(at)gmail(dot)com>, "Bruce Momjian" <bruce(at)momjian(dot)us>
Cc: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, <heikki(at)enterprisedb(dot)com>, "Gregory Stark" <stark(at)enterprisedb(dot)com>, "Bryce Nesbitt" <bryce2(at)obviously(dot)com>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Proposed patch - psql wraps at window width
Date: 2008-04-25 20:44:34
Message-ID: 4811FC59.EE98.0025.0@wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>> On Fri, Apr 25, 2008 at 3:14 PM, in message
<37ed240d0804251314y72461b8fy8d56606f362f91c6(at)mail(dot)gmail(dot)com>, "Brendan
Jurd"
<direvus(at)gmail(dot)com> wrote:

> If the user hasn't specified any format at all, then it's fine to
play
> guessing games and try to select the best format automatically for
> him, based on factors like the destination. But IMO once the user
> makes a determination about the output format, that's the end of the
> story. You toe that line.

I would go further, and say that it would be surprising and
troublesome for psql to guess at whether I want wrapping or unaligned
output. A given set of command line switches and a given set of
inputs should give a consistent output format, regardless of whether
it's going into a pipe or a disk file or out to the local console or
back through ssh. Like a previous poster, I often use an interactive
session to refine something that will be run against a list of servers
with xargs or will be run from crontab. If the interactive output is
big enough to cause it to go through "less", then I still want to see
the format it would have if it didn't. If I save to a file from
"less" or copy and paste from a ssh window when it was a few long
lines, I want it to match what I will get if I run directly to disk.

I consider current behavior pretty darned friendly to the way I work.
Some of the suggestions in this thread sound downright nightmarish to
me. I hope that wrapping never happens without an explicit command
line option or a backslash command.

-Kevin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-04-25 20:48:57 Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing
Previous Message Tom Lane 2008-04-25 20:37:09 Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing