title: How can i ignore error in an update query?
body: <p>I am running an update query like</p>
  <pre><code>update datavalue 
     set categoryoptioncomboid = '21519' 
   where dataelementid = '577' and 
         categoryoptioncomboid = '471';
  </code></pre>
  <p>but it is giving an error</p>
  <blockquote>
  <pre><code>ERROR:  duplicate key value violates unique constraint &quot;datavalue_pkey&quot;
  DETAIL:  Key (dataelementid, periodid, sourceid, categoryoptioncomboid, attributeoptioncomboid)=(577, 35538, 10299, 21519, 15) already exists.
  </code></pre>
  </blockquote>
  <p>Is there a way to make postgres continue updating and skip any errors? Is there a way without using procedure for loop?</p>