ERROR: could not stat file “XX.csv”: Unknown error

后端 未结 5 486
我在风中等你
我在风中等你 2020-12-16 14:43

I run this command:

COPY XXX FROM \'D:/XXX.csv\'  WITH (FORMAT CSV, HEADER TRUE, NULL \'NULL\')

In Windows 7, it successfully imports CSV f

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-16 14:52

    It seems this is not a database problem, but a problem of psql / pgadmin. The workaround is using an admin software from the previous psql versions:

    1. Use the existing PostgreSQL 11 database
    2. Install psql or pgadmin from the PostgreSQL 10 installation and use it to upload the file (with the command shown in the question)

    Hope this helps anyone coming across the same problem.

提交回复
热议问题