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

问题描述:

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

具体:

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】用户,这样就能读取文件

具体如下:

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



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章