Testing and evaluating postgresql. Has code from udemy's course, "Learn SQL Using PostgreSQL: From Zero to Hero"
-
Run
docker-compose up -d
to bring up postgres and pgadmin -
Go to
http://localhost:8080
to open pgadmin. Use the username and password indocker-compose.yml
file to login -
To stop use,
docker-compose stop
. -
To tear down the stack, use
docker-compose down
-
To connect via
psql
afterdocker-compose
, usedocker run -it --rm --network pg-network -e PGPASSWORD=testpassword postgres psql -h postgres -U postgres
-
To use SQL right from vs-code, install the tool
SQLTools - Database tools
.- Setup the connection
- Attach a file to a connection
- Select the query you want to run
- Press Cmd+E twice to run that query