I am trying to copy a file, but getting error message
我是Postgres的新手,可能错过了一些愚蠢的东西(目录的正确名称)。 有人可以指导我吗?
我正在遵循书籍说明,Anthony DeBarros的《实用SQL》
码:
copy us_counties_2010 from
'C:\Users\obella\OneDrive\Desktop\us_counties_2010.csv' with (FORMAT
CSV, HEADER);
错误:
ERROR: could not open file
"C:\Users\obella\OneDrive\Desktop\us_counties_2010.csv" for reading:
Permission denied HINT: COPY FROM instructs the PostgreSQL server
process to read a file. You may want a client-side facility such as
psql's \copy. SQL state: 42501copy us_counties_2010 from
'C:\Users\obella\OneDrive\Desktop\us_counties_2010.csv' with (FORMAT
CSV, HEADER);
预期:
Query returned successfully: 3143 rows affected
实际:
ERROR: could not open file
"C:\Users\obella\OneDrive\Desktop\us_counties_2010.csv" for reading:
Permission denied HINT: COPY FROM instructs the PostgreSQL server
process to read a file. You may want a client-side facility such as
psql's \copy. SQL state: 42501
消息告诉您,不允许Postres读取文件。
如果要解决此问题,请打开"任务管理器",然后单击"显示所有用户的进程"。 查找图像名称为
或者按照消息提示使用