0

I'm trying to import csv file's table into pgAdmin using COPY command and getting the error:

ERROR: could not open file "R:\myfile.csv" for reading: No such file or directory
HINT: COPY FROM instructs the PostgreSQL server process to read a file. You may want a client-side facility such as psql's \copy.

The statement is:

copy tst_copy from 'R:\myfile.csv'
  • I don't think pgAdmin has a /copy capability like psql has. Did you notice the error message: You may want a client-side facility such as psql's \copy. – Frank Heikens Dec 15 '21 at 12:35
  • However, did you check https://www.pgadmin.org/docs/pgadmin4/6.2/import_export_data.html – Frank Heikens Dec 15 '21 at 12:36
  • i new about import/export dialog option but i need to do it with command ( for future job) if it possible – user2381509 Dec 15 '21 at 12:47
  • 1
    Not with the COPY-statement because that's a server side statement and not a client side statement. You could use a client side protocol that supports copy, that is what psql does. – Frank Heikens Dec 15 '21 at 12:49

0 Answers0