[PostgreSQL] PSQL basic command

1. Login to PostgreSQL

psql -h abc.com -U userA -d databaseA 

2. List databases

Most Postgres servers have three databases defined by default: template0, template1 and postgres. template0 and template1 are skeleton databases that are or can be used by the CREATE DATABASE command. postgres is the default database you will connect to before you have created any other databases.

\c databaseName ##switch database

3. List tables