Tim
Tim

Reputation: 99488

How can I show the output of psql commands correctly in a terminal emulator?

I am using psql command line client in terminal emulator lxterminal in Ubuntu. When I run the following command the output is mess

students=# select * from information_schema.routines;

enter image description here

I wonder if it is possible to view the output in a terminal emulator as a nice table? Thanks.

p.s. Here is a similar question for mysql: How can I show the output of mysql commands correctly in a terminal emulator?.

Upvotes: 0

Views: 2806

Answers (1)

Vao Tsun
Vao Tsun

Reputation: 51599

for "vertical" display, use \x https://www.postgresql.org/docs/current/static/app-psql.html

-x

--expanded

Turn on the expanded table formatting mode. This is equivalent to \x or \pset expanded.

Upvotes: 2

Related Questions