postgres C:: Permission denied using windows

Viewed 2381

I am using Windows 10

I have a PostgreSQL file when I run inside the PSQL CMD

\i FILENAMEPATH

postgres=# \i C:\Users\Asus\Desktop\Projects\Movies\solution.sql
C:: Permission denied

I get that Permission Denied

C:: Permission denied

Is there a way around this? Or how can I gain permission?

1 Answers

As a_horse_with_no_name pointed out, using forward slashes instead of backslashes in the address solves the problem.

This is because windows unlike most OSs, resolves paths with forward slashes.

Related