Re: psql word wrapping to terminal width - testers? - Mailing list pgsql-sql

From Bryce Nesbitt
Subject Re: psql word wrapping to terminal width - testers?
Date
Msg-id 47CC51BF.8050209@obviously.com
Whole thread Raw
In response to psql word wrapping to terminal width - testers?  (Bryce Nesbitt <bryce2@obviously.com>)
List pgsql-sql
<br /><br /> Karsten Hilbert wrote:<br /><blockquote cite="mid:20080303122202.GA4028@merkur.hilbert.loc"
type="cite"><blockquotetype="cite"><pre wrap=""># \pset format aligned-wrapped
 
# \pset border 2
# select * from distributors order by did;
+------+--------------------+---------------------+---------------+
| did  |        name        |        descr        | long_col_name |
+------+--------------------+---------------------+---------------+
|    1 | Food fish and wine | default             |               |
|    2 | Cat Food Heaven 2  | abcdefghijklmnopqrs !               |   </pre></blockquote><pre wrap="">
                                 ^
 
Any chance you could put an indicator here to point out the
field has been wrapped ? </pre></blockquote> It is there but subtle.  Note the ! instead of |.<br /><br /><blockquote
cite="mid:20080303122202.GA4028@merkur.hilbert.loc"type="cite"><pre wrap="">Did you consider
 

- a maximum length up to which fields will indeed be wrapped ? (\pset format aligned-wrapped 50) this will prevent a
reallylarge text field being wrapped to hundreds of lines thereby scrolling off everything else </pre></blockquote>
Yes,but truncating the request with substr() seems to address this need.  A large field restricted in height would just
blowout the width otherwise.<br /><br /><blockquote cite="mid:20080303122202.GA4028@merkur.hilbert.loc"
type="cite"><prewrap="">
 
- ignoring wrapping bytea ? </pre></blockquote> Why treat bytea specially?  In many cases it's unlikely to make any
senseto print on a console anyway.  How would you want bytea represented?<br />  <br /><blockquote
cite="mid:20080303122202.GA4028@merkur.hilbert.loc"type="cite"><pre wrap="">- allowing truncation of fields at a
certainlength before wrapping ? (well, this can be handled by truncating at the SQL level, too)
 

Even without any of the above suggestions this will be a
*very* appreciated improvement of the already excellent
psql.
Karsten </pre></blockquote>

pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: compiling plpython compilation error
Next
From: "li ethan"
Date:
Subject: php to pgsql question