Need text wrapping inside a column to avoid record wrapping (tabularoutput of 'select')

Поиск
Список
Период
Сортировка
От David Gauthier
Тема Need text wrapping inside a column to avoid record wrapping (tabularoutput of 'select')
Дата
Msg-id CAMBRECAWB6cDuStEP05cMeUi6ZqY7ACosW4--1PEch6P8-1gJQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Need text wrapping inside a column to avoid record wrapping(tabular output of 'select')
Re: Need text wrapping inside a column to avoid record wrapping(tabular output of 'select')
Список pgsql-general
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).

Example:

name           |age  |life_story                                |favorite_color
---------------+-----+------------------------------------------+--------------
madame marie   | 123 | She was born a long time ago, blah, blah,| yellow
               |     | blah, blah, blah, blah, blah, blah, blah,|
               |     | blah, more-more-mmore-more-more,         |
               |     | andmore-andmore-andmore-andmore, blah,   |
               |     | blah, blah, blah, blah, blah, blah, blah |
               |     | and now she's 123 years old              |
---------------+-----+------------------------------------------+---------------

... that sort of thing.  Also, line breaks in the "life_story" where they make sense, like on spaces, as you see in lines 3&4 of that column

Is there an easy way to configure PG to do this ?

Thanks in Advance !

В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Permission denied on schema for all users on insert to table withfk
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Need text wrapping inside a column to avoid record wrapping(tabular output of 'select')