“extra data after last expected column” while trying to import a csv file into postgresql

后端 未结 3 1109
栀梦
栀梦 2020-12-29 02:02

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



        
3条回答
  •  孤城傲影
    2020-12-29 02:18

    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

    I created DDL from the csv headers

提交回复
热议问题