title: "extra data after last expected column" while trying to import a csv file into postgresql
body: <p>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".</p>
  
  <p>The content of my CSV is </p>
  
  <pre><code>    agency_id,agency_name,agency_url,agency_timezone,agency_lang,agency_phone
  100,RATP (100),http://www.ratp.fr/,CET,,
  </code></pre>
  
  <p>and my postgresql command is </p>
  
  <pre><code>COPY agency (agency_name, agency_url, agency_timezone) FROM 'myFile.txt' CSV HEADER DELIMITER ',';
  </code></pre>
  
  <p>Here is my table </p>
  
  <pre><code>CREATE TABLE agency (
      agency_id character varying,
      agency_name character varying NOT NULL,
      agency_url character varying NOT NULL,
      agency_timezone character varying NOT NULL,
      agency_lang character varying,
      agency_phone character varying,
      agency_fare_url character varying
  );
  
       Column      |       Type        | Modifiers 
  -----------------+-------------------+-----------
   agency_id       | character varying | 
   agency_name     | character varying | not null
   agency_url      | character varying | not null
   agency_timezone | character varying | not null
   agency_lang     | character varying | 
   agency_phone    | character varying | 
   agency_fare_url | character varying | 
  </code></pre>