关于sql:我正在尝试复制文件,但收到错误消息

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: 42501

copy 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读取文件。

如果要解决此问题,请打开"任务管理器",然后单击"显示所有用户的进程"。 查找图像名称为postgres.exe(可能不止一个)的行。 记住"用户名"列中的值(可能为NETWORK SERVICE)。 打开文件的属性,在"安全性"选项卡中添加该用户,并授予对其的读取访问权限。

或者按照消息提示使用psql\copy