title: Postgres convert empty string to NULL
body: <p>I run a Postgres database and would like to convert <strong>empty string</strong> into <strong>NULL</strong>.
  The following snipped should do this with all columns, but it isn't working.</p>
  
  <pre><code>SELECT * FROM schema.table NULLIF(columnname,'');
  </code></pre>
  
  <p>The error message is:</p>
  
  <pre><code>ERROR:  syntax error at or near "''"
  LINE 2:  NULLIF(columnname,'');
  </code></pre>