Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

postgres C:: Permission denied using windows

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?

like image 856
Mohamed Avatar asked Apr 22 '26 06:04

Mohamed


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.

like image 63
Cedric Moore Avatar answered Apr 24 '26 21:04

Cedric Moore