From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Bryce Nesbitt <bryce2(at)obviously(dot)com> |
Cc: | PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Proposed patch - psql wraps at window width |
Date: | 2008-04-29 12:17:26 |
Message-ID: | 200804291217.m3TCHQV08687@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Bryce Nesbitt wrote:
> Bruce Momjian wrote:
> > I have updated the documentation for this patch. I consider it ready to
> > apply. I think it is as close to a middle ground as we are going to
> > get. Further adjustment will have to happen when we have more reports
> > from the field.
>
> I heard a pretty compelling argument to make "wrapped" part of "aligned",
> and thus I think the patch is ready to go only after adjusting the
> user-facing syntax:
>
>
> \pset border 2
> \pset format aligned
> Output format is aligned, no wrapping.
>
> \pset format aligned autowrap
> Output format is aligned, with automatic wrapping to the window width for terminals.
>
> \pset format aligned 80
> Output format is aligned, with a target width of 80 characters.
>
> \a
> Output format is unaligned, no wrapping.
> \a
> Output format is aligned, with a target width of 80 characters.
>
>
>
> If the wrapping code can't fit the column headings in the wrap width,
> it gives up and produces aligned output. To do otherwise is totally
> unreadable. Please give the patch a try, before complaining about this
> particular aspect of it.
Uh, well, we can do that, though looking at the psql code \pset only
wants two arguments. We would have to modify how \pset works. Also, I
am afraid making wrapping part of aligned is overly complicating the
API. For example, I specificially kept \pset columns rather than
allowing a third argument to pset because it was starting to look too
complicated to describe in the manual.
I am not 100% sure myself so hopefully others will comment.
--
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. +
From | Date | Subject | |
---|---|---|---|
Next Message | Zubkovsky, Sergey | 2008-04-29 12:18:25 | Re: [HACKERS] [DOCS] pg_total_relation_size() and CHECKPOINT |
Previous Message | Bruce Momjian | 2008-04-29 12:10:57 | Re: Proposed patch - psql wraps at window width |
From | Date | Subject | |
---|---|---|---|
Next Message | Zubkovsky, Sergey | 2008-04-29 12:18:25 | Re: [HACKERS] [DOCS] pg_total_relation_size() and CHECKPOINT |
Previous Message | Magnus Hagander | 2008-04-29 11:40:23 | Re: win32mak_patch |