I try to copy the content of a CSV file into my postgresql db and I get this error \"extra data after last expected column\".
The content of my CSV is
I tried your example and it works fine but ....
your command from the psql command line is missing \
\
database=# \COPY agency FROM 'myFile.txt' CSV HEADER DELIMITER ',';
And next time please include DDL
DDL
I created DDL from the csv headers