Re: Proposed patch - psql wraps at window width

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Bruce Momjian" <bruce(at)momjian(dot)us>
Cc: "Brendan Jurd" <direvus(at)gmail(dot)com>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>, "Bryce Nesbitt" <bryce2(at)obviously(dot)com>, <heikki(at)enterprisedb(dot)com>
Subject: Re: Proposed patch - psql wraps at window width
Date: 2008-04-24 17:34:31
Message-ID: 87y7736tso.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

"Bruce Momjian" <bruce(at)momjian(dot)us> writes:

> 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.

Consider that this means that

psql -Pformat=wrapped -e 'select * from tab'

and

psql -Pformat=wrapped -e 'select * from tab' | more

will generate different output. That's bunk.

This is what I mean about trying to guess about what users expect. If you come
up with complicated logic trying to anticipate every case and get it wrong
users get angry.

If you just have simple rules which always apply then users understand they
they need to override them for their corner cases.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training!

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-04-24 17:46:22 Re: [GENERAL] I think this is a BUG?
Previous Message Bruce Momjian 2008-04-24 17:32:55 Re: 8.3 / 8.2.6 restore comparison

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2008-04-24 17:44:27 Re: 64-bit CommandIds
Previous Message Bruce Momjian 2008-04-24 16:38:27 Re: Proposed patch - psql wraps at window width