On Ubuntu, running psql from command line, when I type in ‘d {tableName}’ it takes me to some viewer mode similar to vi where I have to then hit ‘q’ to go back. Then I lose the list of columns that I was just seeing and am back to the console.
Is there some way to have it like it is on CentOS where the output of
‘d {tableName}’ is a simple query that writes output onto the console and stays there?
2
Answers
It depends on pager configuration. You should to check content of
PAGER
variable.If you use a
pspg
pager, then a option-X
disables returning original content of display when the pager is ended. Same option has a pagerless
.One of good configuration for
less
pager can beThat viewer mode is called a pager.
You can disable it in the psql shell with
or when starting psql by passing the
pset
flag:pset
is used to specify printing options. See the docs on psql for more.