windows中PostgreSQL的文件权限ERROR: could not open file... for reading: Permission denied

问题描述:

在windows中,即使文件的【属性】中【安全】已有postgres用户相应的访问权限,但依然出现permission denied

windows中PostgreSQL的文件权限ERROR: could not open file... for reading: Permission denied_第1张图片

具体:

a_gp=# copy city from 'F:\programmingPractice\CSU_SQL\market\pipeCity.csv' with csv header delimiter ',';
ERROR:  could not open file "F:\programmingPractice\CSU_SQL\market\pipeCity.csv" for reading: Permission denied

解决方案:

添加【everyone】用户,这样就能读取文件

windows中PostgreSQL的文件权限ERROR: could not open file... for reading: Permission denied_第2张图片

具体如下:

a_gp=# copy city from 'F:\programmingPractice\CSU_SQL\market\pipeCity.csv' with csv header delimiter ',';
ERROR:  could not open file "F:\programmingPractice\CSU_SQL\market\pipeCity.csv" for reading: Permission denied
a_gp=# copy city from 'F:\programmingPractice\CSU_SQL\market\pipeCity.csv' with csv header delimiter ',';
COPY 361



你可能感兴趣的:(SQL类)