How to run postgrSQL in windows terminal(if you have docker installed).


 docker run --name my-postgres1 -e POSTGRES_PASSWORD=mysecretpassword -d -p 5432:5432 postgres.

-- if the docker image is there, prior to use the it can simply be runned by

 docker run <image name>
docker exec -it my-postgres1 psql -U postgres -d postgres 

this command in terminal . -- then enter the password and it will connect to localhost Postgress instance . -- now you will be inside the postress command line that looks like postgres-# .