Re: Proposed patch - psql wraps at window width

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Brendan Jurd <direvus(at)gmail(dot)com>, Bryce Nesbitt <bryce2(at)obviously(dot)com>, heikki(at)enterprisedb(dot)com
Subject: Re: Proposed patch - psql wraps at window width
Date: 2008-04-25 14:26:38
Message-ID: 200804251426.m3PEQcR20040@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:
> We have discussed having a formatting mode where aligned output switches
> to expanded output when the row is too wide. One idea would be to
> create an 'auto' mode that would display in aligned, or wrapped if that
> doesn't fit, or expanded if that doesn't fit.

I haven't heard any new ideas of how to resolve this issue in the past
few hours so I will throw out two new ideas.

Have a 'format=auto' mode that does aligned/wrapped/expanded, but only
for screen output --- file/pipe would still use aligned. And have
'format=wrapped' affect file/pipe by requiring the user to specify the
width, or use a default of 72.

Another idea is to require the user to specify the file/pipe output
width when they define format=wrapped, e.g. format=wrapped:75. If they
don't specify the width, 'wrapped' doesn't affect file/pipe. (Perhaps
the width controls screen width too.) (That is effectively what \pset
columns does, but this is more integrated.)

I have heard why people want 'wrapped' to affect file/pipe output, but I
have not heard a clear explanation of why people don't want that. I
personally think that having the screen width affect the width of
file/pipe is odd, but if the user specifies the width, it seems fine to
me. What is the objection?

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-04-25 14:45:01 Re: Proposed patch - psql wraps at window width
Previous Message Alvaro Herrera 2008-04-25 13:10:57 Re: MERGE Specification