how to store csv file in postgresql code example
Example 1: run postgresql dump to csv
\copy (SELECT * FROM persons) to 'C:\tmp\persons_client.csv' with csv
Example 2: postgresql export output table as a csv
COPY table_name TO 'file_name.csv' DELIMITER ',' CSV HEADER;