I have created a table named ‘excel’, to read and store .csv in table in pgAdmin-4.
Table has been successfully created but when I try to import the data, It shows permission denied.
I tried to import the data and run the query shown below:
Query: " copy excel from ‘C:UserskumarDownloadsOrderData.csv’ with csv header "
Error I received:
ERROR: could not open file "C:UserskumarDownloadsOrderData.csv" for reading: Permission denied
SQL state: 42501
2
Answers
your problem mainly related to access permissions you can check this Q&A for more
details ,
Permission denied when trying to import a CSV file from PGAdmin
You can try copying the CSV file to a directory where PostgreSQL has read access, such as the PostgreSQL data directory itself, and then attempt the import again