I encounter an issue when i try to run .sql file in the psql shell(windows)
my code:
tpchr=> \i 'C:/Users/kyyy/Desktop/ts/dbLoadTPCHR.sql'
;
i got error stating:
psql:C:/Users/kyyy/Desktop/ts/dbLoadTPCHR.sql:1:
ERROR: could not open file "C:/Users/kyyy/Desktop/ts/supplier.csv" for reading: Permission denied
psql:C:/Users/kyyy/Desktop/ts/dbLoadTPCHR.sql:3:
ERROR: could not open file "C://Users/kyyy/Desktop/ts/part.csv" for reading: Permission denied
dbLoadTPCHR.sql
contains the path to supplier.csv
and part.csv
that is stored in the same location.
I am trying to load the .sql file inside my table as the csv file contains the inform that was required to insert into the table.
I have faced similar issues, and I recommend trying the following steps, listed in order of significance, hopefully, one will work:
(/ or \\)
.