Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Sql > psql word wrapp...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 3321 of 3797
Post > Topic >>

psql word wrapping to terminal width - testers?

by bryce2@[EMAIL PROTECTED] (Bryce Nesbitt) Mar 2, 2008 at 10:20 PM

I'm fini****ng up work on a version of the psql command line client that 
can can shrink columns until they fit in your terminal window.  For 
example on 67 column ssh session...

# \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 !               |
|      |                    | tuvwxyz             |               |
|    3 | Cat Food Heaven 3  | default             |               |
|    4 | Cat Food Heaven 4  | default             |               |
|    5 | Food Heaven        | default             |               |
|   10 | Lah                | default             |               |
|   12 | name               | line one            |               |
| 2892 ! short name         | short               |               |
| 8732 |                    |                     |               |
+------+--------------------+---------------------+---------------+
(8 rows)

....where columns 'descr' and 'did' each have a wrapped row.  I'll send a 
postgres 8.4devel linux intel binary to anyone willing to try it out.

I've got one painful edge case left to handle, but if it works well on 
various platforms, and others find it useful, I'd like to learn how and 
where to introduce it as a patch.  Any tips are appreciated.

This is intended to solve that annoying case where a few rows in a 
column are too long, blowing past the widest window you can fit onscreen.

          -Bryce Nesbitt


--
Sent via pgsql-sql mailing list (pgsql-sql@[EMAIL PROTECTED]
)
To make changes to your Subscription:
http://mail.postgresql.org/mj/mj_wwwusr?domain=postgresql.org&extra=pgsql-sql
 




 2 Posts in Topic:
psql word wrapping to terminal width - testers?
bryce2@[EMAIL PROTECTED]   2008-03-02 22:20:27 
Re: psql word wrapping to terminal width - testers?
bryce2@[EMAIL PROTECTED]   2008-03-03 11:30:07 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 9:47:56 CST 2008.