title: Postgres COPY TO NULL integers
body: <p>I have a CSV that contains various columns.  One of the columns contains integer data.  However, when running a copy to:</p>
  
  <pre><code>COPY soc 
  FROM '~/soc.asc'
  WITH DELIMITER '$';
  </code></pre>
  
  <p>I'm getting the following:</p>
  
  <pre><code>ERROR:  invalid input syntax for integer: ""
  CONTEXT:  COPY soc, line 1, column soc_code: ""
  </code></pre>
  
  <p>as it appears that Postgres is trying to stick an empty string in an integer.  How can I fix this?  I don't really want to fudge my schema to suit the import if it can be helped.</p>