title: How to SET value to NULL in integer column in case of empty input
body: <p>When I am trying to use following update query...</p>
  <pre><code>UPDATE
              product_table
          SET
              product_name = $1,
              price = $2,
              delivery_interval = NULLIF ($3, '')
          WHERE
              id = $4;
  </code></pre>
  <p>...following appears...</p>
  <pre><code>error: column &quot;delivery_interval&quot; is of type integer but expression is of type text
  </code></pre>
  <p><code>delivery_interval = NULL</code> instead of <code>NULLIF ($3, '')</code> seems to work. Why?</p>