I have downloaded the dvd rental.tar file on my desktop. followed the below instructions
pwd
/Users/O2/tools/postgres
mkdir dvdrentaldb
initdb dvdrentaldb
I get the following message
initdb directory "dvdrentaldb' exists but is not empty If you want to create a new database system either remove or empty the directory or run initdb with an argument other than "dvdrentaldb"
I have downloaded the dvd rental.tar file on my desktop. followed the below instructions
pwd
/Users/O2/tools/postgres
mkdir dvdrentaldb
initdb dvdrentaldb
post this i am using the following code
pg_restore -U O2 -d dvdrentaldb dvdrental.tar
i get syntax error at or near "pg_restore"
I get the following message
initdb directory "dvdrentaldb' exists but is not empty If you want to create a new database system either remove or empty the directory or run initdb with an argument other than "dvdrentaldb"
Got this from reddit
https://www.reddit.com/r/PostgreSQL/comments/93uuhg/can_anyone_get_this_sample_database_tutorial_to/
createuser -s dvdrental
createdb dvdrental -O dvdrental
pg_restore -U dvdrental -d dvdrental ./dvdrental.tar
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With