Postgres ERROR: could not open file for reading: Permission denied

前端 未结 15 2279
慢半拍i
慢半拍i 2020-12-04 13:15

Computer: Mac OS X, version 10.8 Database: Postgres

Trying to import csv file into postgres.

pg> copy items_ordered from \'/users/darchcruise/desk         


        
15条回答
  •  伪装坚强ぢ
    2020-12-04 13:52

    for macbook first i opened terminal then type

    open /tmp
    

    or in finder directory you directly enter command+shift+g then type /tmp in go to the folder.

    it opens temp folder in finder. then i paste copied csv file into this folder.then again i go to postgres terminal and typed below command and then it is copied my csv data into db table

    \copy recharge_operator FROM '/private/tmp/operator.csv' DELIMITER ',' CSV;
    

提交回复
热议问题