My requirement is write the csv from postgres table data , then i facing the below issue , please give some tips to resolve this issue.
org.postgresql.util.PSQLException: ERROR: could not open file
when i use this query
COPY (SELECT * from <table>) To <filename> DELIMITER ',' CSV HEADER";