English 中文(简体)
为什么在Pgsql为我提供制版或复印件?
原标题:Why doesn t Copy or copy work for me in Pgsql?

我正试图将数据从小数输入邮政。 我尝试了以下错误:

Copy TA_Files 
FROM  C:UsersABla47DocumentsTA 11.19.21.csv 
DELIMITER  , 
CSV HEADER;

ERROR: could not open file "C:UsersABla47DocumentsTA 11.19.21.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 TA_Files 
FROM  DocumentsTA 11.19.21.csv 
DELIMITER  , 
CSV HEADER;

ERROR: syntax误差 at or near ""”

LINE 1: Copy TA_Files

谁能帮助我知道,我需要用什么格式将数据从碎块输入表格?

增 编

问题回答

this worked for me:
I placed the files in C:Program FilesPostgreSQL14pgAdmin 4 directory and copied it from there.

COPY superstore_people(person, region)
FROM  C:Program FilesPostgreSQL14pgAdmin 4superstore_people.csv 
DELIMITER  , 
CSV HEADER;

这个问题很晚,但刚刚出现,在停滞不前的情况下却看不到这一解决办法。 这是我最简单的解决办法。

https://www.commandprompt.com/education/how-to-fix-permission-denied-error-while-importing-a-csv-file-in-postgresql/“rel=” https://www.commandprompt.com/education/how-to-fix-permission-denied-error-while-importing-a-csv-file-in-postgresql/

只是要提交财产——和;安全——和;编辑——和;然后是物体名称类型 人人: - &;应用变化

我抄送邮袋的文档为进口<编码>CSV文档。





相关问题
摘录数据

我如何将Excel板的数据输入我的Django应用? I m将PosgreSQL数据库作为数据库。

Postgres dump of only parts of tables for a dev snapshot

On production our database is a few hundred gigabytes in size. For development and testing, we need to create snapshots of this database that are functionally equivalent, but which are only 10 or 20 ...

How to join attributes in sql select statement?

I want to join few attributes in select statement as one for example select id, (name + + surname + + age) as info from users this doesn t work, how to do it? I m using postgreSQL.

What text encoding to use?

I need to setup my PostgreSQL DB s text encoding to handle non-American English characters that you d find showing up in languages such as German, Spanish, and French. What character encoding should ...

SQL LIKE condition to check for integer?

I am using a set of SQL LIKE conditions to go through the alphabet and list all items beginning with the appropriate letter, e.g. to get all books where the title starts with the letter "A": SELECT * ...

热门标签