Installation
Unlike MySql, In postgres we can have users coupled with system users. So whenever you try psql
command the default user will be your current loggedin system user. While installation it creates a user with username postgres in the system to access db.
login into default user
After login as default user you need to create a new user with username same as your system username.
create a role
If you forgot to give CREATEDB permission while creating user you can alter it using the sql below,
After creating new role/user, logout from the postgres user by typing \q
in the psql prompt.
Now login into the psql by selecting the default database.
Now you login with the default user which have the same username as your system user.
After login you can create a new DB.
Using postgres is a bit different from using Mysql,
`SHOW DATABASES` : `\l`
`SHOW TABLES` : `\d`
`DESC table` : `\d table`
`exit` : `\q`
`help` : `\h` or `\?`