I want to use the \copy
command to make csv file with relative path.
I used a query to make from test table to csv file named test.csv
\copy (SELECT * FROM test) to './test.csv' with csv
But in postgresql pgadmin4, it shows that \copy
command as a syntax error (there is an underline under the word '\copy') and shows a message like below.
ERROR: syntax error at or near "/" LINE 2: /copy (SELECT * FROM test) to './persons_client.csv' with cs... ^ ********** Error ********** ERROR: syntax error at or near "/" SQL state: 42601 Character: 2
How can I solve this problem?