尝试从 PGAdmin 导入 CSV 文件时权限被拒绝 [英] Permission denied when trying to import a CSV file from PGAdmin
问题描述
我使用的是 PGAdmin 1.14.3.
当我尝试执行导入命令时:
COPY grad(country_code, postal_code, place_name, admin_name1, admin_code1, admin_name2, admin_code2, admin_name3, admin_code3, 纬度, 经度, 精度)FROM 'C:\Users\denis\Desktop\BP2Project\USA\US.txt';
我得到一个
<块引用>错误:无法打开文件C:UsersdenisDesktopBP2ProjectUSAUS.txt"阅读:权限被拒绝的 SQL 状态:42501
我确实查找了其他 类似的问题,但没有一个能解决我的问题.
我以超级用户postgres"用户身份登录.我不明白为什么我缺少权限.我使用的是 Windows 7.
用户 Postgres
必须对要从中复制的文件具有读取权限.
查看这篇文章,了解如何在 Windows 上修改文件的安全访问权限.>
I'm using PGAdmin 1.14.3.
When I try to execute an import command:
COPY grad(country_code, postal_code, place_name, admin_name1, admin_code1, admin_name2, admin_code2, admin_name3, admin_code3, latitude, longitude, accuracy)
FROM 'C:\Users\denis\Desktop\BP2Project\USA\US.txt';
I get a
ERROR: could not open file "C:UsersdenisDesktopBP2ProjectUSAUS.txt" for reading: Permission denied SQL state: 42501
I did look up other similar questions and none of them solved my issue.
I logged in as user "postgres" who is the superuser. I don't see why I'm missing permissions. I'm on Windows 7.
The user Postgres
must have read access on the file from which you are about to copy.
Look at this article to see how to modify files' security access on Windows.
这篇关于尝试从 PGAdmin 导入 CSV 文件时权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!