title: postgres csv date null import error
body: <p>I am importing data into a Postgres database. The table I am importing to includes a couple of columns with dates. </p>
  
  <p>The CSV file I am uploading, however, has empty values for some of the date fields. </p>
  
  <p>The table looks like this:</p>
  
  <pre><code>dot_number bigint,
  legal_name character varying,
  dba_name character varying,
  carrier_operation character varying,
  hm_flag character varying,
  pc_flag character varying,
  ...
  mcs150_date date,
  mcs150_mileage bigint,
  </code></pre>
  
  <p>The data looks like this:</p>
  
  <pre><code>1000045,"GLENN M HINES","","C","N","N","317 BURNT BROW RD","HAMMOND","ME","04730","US","317 BURNT BROW RD","HAMMOND","ME","04730","US","(207) 532-4141","","","19-NOV-13","20000","2012","23-JAN-02","ME","1","2"
  1000050,"ROGER L BUNCH","","C","N","N","108 ST CHARLES CT","GLASGOW","KY","42141","US","108 ST CHARLES CT","GLASGOW","KY","42141","US","(270) 651-3940","","","","72000","2001","23-JAN-02","KY","1","1"
  </code></pre>
  
  <p>I have tried doing this:</p>
  
  <pre><code>COPY CC FROM 'C:\Users\Owner\Documents\FMCSA Data\FMCSA_CENSUS1_2016Sep.txt' DELIMITER ',' CSV HEADER NULL '';
  </code></pre>
  
  <p>But I get this error:</p>
  
  <blockquote>
    <p>ERROR:  invalid input syntax for type date: "" CONTEXT:  COPY cc, line
    24, column mcs150_date: ""
    ********** Error **********</p>
    
    <p>ERROR: invalid input syntax for type date: "" SQL state: 22007
    Context: COPY cc, line 24, column mcs150_date: ""</p>
  </blockquote>
  
  <p>This is probably pretty simple, but none of the solutions I've found online did not work.</p>