skilbjo
skilbjo

Reputation: 514

Show resultset of psql queries in the CLI rather than nano

I have two raspberry pi's; both with postgres-installed databases.

On one pi, when I'm in the psql command line and do something like select * from "User"; it shows me the results in the shell/stdout.

When I'm on the other pi and type the same select * from "User";, it shows the output in nano, and I have to hit Q to escape and go back to the command line interface.

How do I remove the editor setting in psql to just show the output of the query in the command line interface?

I've found documentation to set the editor to something (http://www.postgresql.org/docs/9.1/static/app-psql.html) but I don't want to set the editor to anything, just have it print out (so I don't have to hit Q every time)

Upvotes: 1

Views: 194

Answers (1)

alexius
alexius

Reputation: 2576

run in psql

\pset pager off

or put this line into your .psqlrc file. then pager won't be used no matter how large output is.

Upvotes: 1

Related Questions