title: PostgreSQL not importing NULL values from a CSV file
body: <p>I created a huge database in <code>PostgreSQL</code> where I have integer fields that can take <strong>NULL</strong> values. However when I am trying to import data into the database from a <strong>CSV</strong> file, it throws me the following error:</p>
  
  <pre><code>ERROR:  invalid input syntax for integer: "NULL"
  CONTEXT:  COPY reports_results, line 1, column teacher_id: "NULL"
  </code></pre>
  
  <p>I am trying to import into the database using the <strong>copy</strong> command like:</p>
  
  <pre><code>copy  reports_results(test_type_id, teacher_id)
  from '/Downloads/mydata.csv';
  </code></pre>
  
  <p>So what I understood so far is that the database will not accept <code>NULL</code> values in quotes ie. <code>"NULL"</code>. But my <strong>csv</strong> file does not have any quotes wherever the <code>NULL</code> values are present. How do I import them in such cases?</p>