psql – (Postgres bundled command line tool)

Start psql

Check it's installed: 
psql --version
Login: 
psql -U [user]  Example : psql -U postgres 

Listing Databases

/list

Switching Databases

\c nomina

Listing Tables

\dt

Show Data Structure of Table

\d+ tableNameHere

List Schemas

Simple meta command to list schema of current db

\dn

Show connection information

\conninfo

Help

\?

Exit

Use \q to exit the help screen

Leave a comment