Re: Need text wrapping inside a column to avoid record wrapping(tabular output of 'select') - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Need text wrapping inside a column to avoid record wrapping(tabular output of 'select')
Date
Msg-id 20180725165236.w2jxbvetk47c4tjk@alvherre.pgsql
Whole thread Raw
In response to Need text wrapping inside a column to avoid record wrapping (tabularoutput of 'select')  (David Gauthier <davegauthierpg@gmail.com>)
List pgsql-general
On 2018-Jul-25, David Gauthier wrote:

> Hi:
> 
> psql (9.6.7, server 9.1.9)  on RHEL6
> 
> In order to avoid record wrapping in the tabular output of a "select"
> statement, I need to limit the width of certain columns.  For those
> columns, I would like to have text wrapping so as not to lose any
> information (IOW, I don't want to simply truncatate and lose info).

\pset format wrapped

It doesn't break on whitespace though.

 $ 999,00 │ Nine hundred ninety nine dollars and z…
          │…ero cents
 $ 1.000,…│ One thousand  dollars and zero cents
…      00 │ 

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-general by date:

Previous
From: David Gauthier
Date:
Subject: Need text wrapping inside a column to avoid record wrapping (tabularoutput of 'select')
Next
From: Adrian Klaver
Date:
Subject: Re: Need text wrapping inside a column to avoid record wrapping(tabular output of 'select')