Version of PostgreSQL:
cmd:select version();

to know the version of postgres

Creating the user in the shell prompt:

cmd:create user postgres_user;

create user

Creating the database in the shell prompt:

cmd:
/usr/local/pgsql/bin/createdb my_db -O postgres -p 5435;

create db in psql

-> To query the created database use the cmd:

switch to the db

Get a list of databases in a Postgresql database:

cmd:\l
to list the databases

Delete/Drop an existing PostgreSQL database:

cmd:DROP DATABASE test;
drop database

Getting help on postgreSQL commands:

-> We can get the syantax for create,delete,index etc. by using the \h and the required syntax name.
cmd:\h CREATE
create cmd help

Get a list of all the tables in a Postgresql database:
cmd: \d
list of tables

To turn on timing, and checking how much time a query takes to execute:
-> After this if you execute a query it will show how much time it took for doing it.
cmd:\timing
cmd:select * from attribute_master_abstract limit 2;
to know the query execution time

To see the list of available functions in PostgreSQL:

cmd:\df or \df+