Re: Proposed patch - psql wraps at window width - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Proposed patch - psql wraps at window width
Date
Msg-id 200804240013.m3O0DFY15540@momjian.us
Whole thread Raw
In response to Re: Proposed patch - psql wraps at window width  ("Brendan Jurd" <direvus@gmail.com>)
Responses Re: Proposed patch - psql wraps at window width  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
Brendan Jurd wrote:
> This is a very cool feature!  Looking through the patch I did have a
> few thoughts.
> 
> This is definitely going to introduce merge conflicts with my
> printTable API patch.  That's not a problem, just a "note to self"
> that when/if this patch goes in I'll have to submit a fresh version of
> my patch.
> 
> This psql message seemed a bit strange:
> 
> +         if (!quiet)
> +             printf(_("Target column width for \"wrap\" format is %d.\n"),
> popt->topt.columns);
> 
> To me, this message sounds like you're setting the width of a single
> column, when in fact you're setting the target *total* width of the
> table.  I think this message would be more clear if it read "Target
> output width ..." or "Target table width ...".  Also, as far as the
> user is concerned the format is referred to as  "wrapped", not "wrap".

Good point.  I have updated the text to be:
test=> \pset columns 70Target width of file and pipe output for "wrap" format is 70.

Patch updated at the same URL.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: "Brendan Jurd"
Date:
Subject: Re: Proposed patch - psql wraps at window width
Next
From: Bruce Momjian
Date:
Subject: Re: WIP: psql default banner patch v3