title: Postgres sql exception handling for batch insert
body: <p>I have two tables and i am inserting the data from one table to other.</p>
  
  <pre><code>insert into a (id1, value1)
  select id, value from b
  </code></pre>
  
  <p>id1 is unique and when I have repeating id in table b. How can I catch the exception for each row in PostgreSQL without halting the execution.</p>