title: ERROR: invalid input syntax for type numeric: " "
body: <p>Getting the following error in one of my views:</p>
  <blockquote>
  <p>SQL Error [22P02]: ERROR: invalid input syntax for type numeric: &quot; &quot;</p>
  </blockquote>
  <p>I think it is because I have used the following COALESCE Command.</p>
  <pre><code>COALESCE(to_number(a_id, '999999999999999'::text), b_id::numeric) AS c_id,
  </code></pre>
  <ul>
  <li><code>a_id</code> is of type <code>text</code></li>
  <li><code>b_id</code> is of type <code>int4</code></li>
  </ul>
  <p>What changes should I make to make it working?</p>