I'm a newbie and new to Postgresql. I'm following a tutorial online and after downloading and extracting the dvdrental.zip into dvdrental.tar . I changed directory to my postgres bin location. And tried to run
pg_restore -U postgres -d dvdrental '/Users/macbookair/Downloads/dvdrental/dvdrental.tar'
But I got this error:
pg_restore: [archiver (db)] connection to database "dvdrental" failed: FATAL: role "postgres" does not exist
Meanwhile my dvdrental database has a postgres role.