\pset expanded on \pset border 2 \pset columns 20 \pset format wrapped \pset linestyle unicode postgres=# select array_to_string(array_agg(repeat('x',n)),E'\n') as "x postgres"# y", array_to_string(array_agg(repeat('yy',10-n)),E'\n') as "x postgres"# y postgres"# z" from (select generate_series(1,10)) as t(n); ┌─[ RECORD 1 ]─────┐ │ x↵│ x ↵│ │ y │ xx ↵│ │ │ xxx ↵│ │ │ xxxx ↵│ │ │ xxxxx ↵│ │ │ xxxxxx ↵│ │ │ xxxxxxx ↵│ │ │ xxxxxxxx ↵│ │ │ xxxxxxxxx ↵│ │ │ xxxxxxxxxx │ │ x↵│ yyyyyyyyyyyy…│ │ y↵│…yyyyyy ↵│ │ z │ yyyyyyyyyyyy…│ │ │…yyyy ↵│ │ │ yyyyyyyyyyyy…│ │ │…yy ↵│ │ │ yyyyyyyyyyyy↵│ │ │ yyyyyyyyyy ↵│ │ │ yyyyyyyy ↵│ │ │ yyyyyy ↵│ │ │ yyyy ↵│ │ │ yy ↵│ │ │ │ └───┴──────────────┘ postgres=# \pset linestyle ascii Line style (linestyle) is ascii. postgres=# select array_to_string(array_agg(repeat('x',n)),E'\n') as "x y", array_to_string(array_agg(repeat('yy',10-n)),E'\n') as "x y z" from (select generate_series(1,10)) as t(n); +-[ RECORD 1 ]-----+ | x+| x +| | y | xx +| | | xxx +| | | xxxx +| | | xxxxx +| | | xxxxxx +| | | xxxxxxx +| | | xxxxxxxx +| | | xxxxxxxxx +| | | xxxxxxxxxx | | x+| yyyyyyyyyyyy.| | y+|.yyyyyy +| | z | yyyyyyyyyyyy.| | |.yyyy +| | | yyyyyyyyyyyy.| | |.yy +| | | yyyyyyyyyyyy+| | | yyyyyyyyyy +| | | yyyyyyyy +| | | yyyyyy +| | | yyyy +| | | yy +| | | | +---+--------------+ postgres=# \pset linestyle old-ascii Line style (linestyle) is old-ascii. postgres=# select array_to_string(array_agg(repeat('x',n)),E'\n') as "x y", array_to_string(array_agg(repeat('yy',10-n)),E'\n') as "x y z" from (select generate_series(1,10)) as t(n); +-[ RECORD 1 ]-----+ | x | x | |+y : xx | | : xxx | | : xxxx | | : xxxxx | | : xxxxxx | | : xxxxxxx | | : xxxxxxxx | | : xxxxxxxxx | | : xxxxxxxxxx | | x | yyyyyyyyyyyy | |+y ; yyyyyy | |+z : yyyyyyyyyyyy | | ; yyyy | | : yyyyyyyyyyyy | | ; yy | | : yyyyyyyyyyyy | | : yyyyyyyyyy | | : yyyyyyyy | | : yyyyyy | | : yyyy | | : yy | | : | +---+--------------+