Gregory Stark wrote:
> >> b) If you dump to a file it will still respect COLUMNS. This might be a bit
> >> weird since bash sets COLUMNS so your file width will be based on the size
> >> of your terminal. But people also do things like COLUMNS=120 psql -o f ...
> >
> > No, that will make the regression tests fail and it is hard to say why
> > you would want a file wrap width to match your screen width.
>
> Well you don't know where the pipe is going, it could be, for example, piped
> to a pager.
>
> I think the point is to keep the logic simple and not put in special cases
> based on assumptions of what users might do. If you have simple logic which
> doesn't do what the user expects in a corner case they understand and we can
> tell them to override it with \pset. If you have logic which does what they
> want normally but does something different sometimes based on criteria which
> they consider irrelevant then they get angry.
They can always do:
test=> \pset columns `echo $COLUMNS`Target width for "wrap" format is 127.
My point is that we should do what most people _expect_, and the
majority of people here have stated they don't think wrap should modify
the file output _by_ _default_.
People who want a specific width for files should be setting their
desired width themselves, hence no need for the '79' default.
-- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB
http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +