Re: Need text wrapping inside a column to avoid record wrapping (tabular output of 'select')

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: David Gauthier <davegauthierpg(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Need text wrapping inside a column to avoid record wrapping (tabular output of 'select')
Date: 2018-07-25 16:52:36
Message-ID: 20180725165236.w2jxbvetk47c4tjk@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-07-25 16:53:17 Re: Need text wrapping inside a column to avoid record wrapping (tabular output of 'select')
Previous Message David Gauthier 2018-07-25 16:40:30 Need text wrapping inside a column to avoid record wrapping (tabular output of 'select')