How to create a database
How to create a user
How to grant access to a user
How to see list of databases
How to see list of tables
CREATE DATABASE mydatabase;
How to create a user
CREATE USER priyank with password 'passw0rd';
How to grant access to a user
GRANT ALL PRIVILEGES ON DATABASE mydatabase to priyank
How to see list of databases
psql -l -U priyank
Alternatively you can connect to database first and then type '\l'
\l
How to see list of tables
#Connect to database first.
\d
\d