Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Proposed patch - psql wraps at window width

From: Bryce Nesbitt <bryce2(at)obviously(dot)com>
To: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>
Subject: Re: [HACKERS] Proposed patch - psql wraps at window width
Date: 2008-04-29 04:43:59
Message-ID: 4816A78F.7080907@obviously.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
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.



In response to

Responses

pgsql-hackers by date

Next:From: PFCDate: 2008-04-29 07:26:24
Subject: Re: Protection from SQL injection
Previous:From: Tom LaneDate: 2008-04-29 04:12:43
Subject: Re: [COMMITTERS] pgsql: Increase the statement_timeout value used in the prepared_xacts

pgsql-patches by date

Next:From: Heikki LinnakangasDate: 2008-04-29 10:42:19
Subject: Map forks (WIP)
Previous:From: Bruce MomjianDate: 2008-04-29 02:11:16
Subject: Re: [HACKERS] Proposed patch - psql wraps at window width

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group