'Copy file from remote server to local machine in Postgres
I cannot figure out how I can copy a remote server file as a CSV file on my local machine (windows). I have tried
\copy mytable TO 'C:/pg/mytable.csv' CSV DELIMITER ','
It shows the following error
ERROR: syntax error at or near "\"
LINE 1: \copy ar_gp_psap TO 'C:\WazeData\WordDocs\ReportMatrix\mytab...
^
SQL state: 42601
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|