Alvaro Herrera wrote:
> Bruce Momjian escribi?:
>
> > Obviously you have expections of how wrapping should behave. Please
> > name me an application that has a wrapped mode that has the output to a
> > file wrap based on the screen width? It isn't 'ls -C'.
>
> Why would we need to imitate what other apps do? What we need to
> investigate is use cases, and how do we cater for each one, making it
> easy for the most common while at the same time making it not impossible
> for the most obscure.
>
> There is no point in doing things in a certain way just because others
> do the same. Are you going to argue that we need to make the server
> crash from time to time because other systems do that too?
>
> We came up with dollar quoting which is a completely novel idea AFAIK.
> Why can't we come up with other useful, novel designs?
Your argument about crashing above seems like reductio ad absurdum
(http://en.wikipedia.org/wiki/Proof_by_contradiction).
My point was that the poster was saying he expected the file/pipe output
to honor the screen width on output, so I asked him for an example of
why he had that expectation --- that seems logical. Perhaps it is only
to be consistent with other psql behavior.
FYI, ls -C actually wraps to 72(?) unless you specify another width, so
one possible behavior would be for \pset wrapped to wrap to 72 for
file/pipe unless you set \pset columns. That might make the "I want it
always to wrap" group happier, but not the "wrapped shouldn't affect
file/pipe". I have not heard anyone explain why the later behavior is
bad, especially if we default to a width of 72 rather than the screen
width.
-- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB
http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +