We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
The problems with the regular method: permission deny.
Solution:
sudo chmod 777 target/dir/
Then in psql:
\copy table TO '/target/dir/table.csv' DELIMITER ',' CSV HEADER;