Note: you can use your own DB but you'll need to adapt the instructions for your use case.
Start the database:
docker compose up --buildConnect to the database:
psql -U postgres --port 54321 -h localhostEnter the password:
password
Confirm the db is created:
\lExpected output should contain a line for the dvdrental DB:
Exit the pgsql prompt using the exit command
The database file dvdrental.tar is included in this project but all credit goes to www.postgresqltutorial.com
pg_restore -U postgres -d dvdrental -h localhost --port 54321 "dvdrental.tar"psql -U postgres --port 54321 -h localhostand enter the password...
\c dvdrental\dtExample:
select count(*) from actors;Example:


