postres \pset columns 100 (oracle~set linesize 100)

If you’re using the psql command line tool, issue this command first:

\pset format wrapped

It should then wrap long lines to your terminal window like so:

test_id |              text
--------+-----------------------------
      1 | Lorem ipsum dolor sit amet,.
        |.consectetur adipiscing elit.
        |.. Mauris lorem

You can also set the number of columns to wrap to with

\pset columns 100

and you can change the dots to ellipses with

\pset linestyle unicode
\pset border 1
\pset format csv
\pset tuples_only
\pset format unaligned
\pset fieldsep '\t'
\pset titleΒ <title>

https://www.postgresql.org/docs/current/app-psql.html

Leave a Reply

Your email address will not be published. Required fields are marked *