>>> On Fri, Apr 25, 2008 at 3:14 PM, in message
<37ed240d0804251314y72461b8fy8d56606f362f91c6@mail.gmail.com>, "Brendan
Jurd"
<direvus@gmail.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