postgresql ON CONFLICT ON CONSTRAINT for 2 constraints
<p>In am currently working with PostgreSQL 9.5 and was wondering if the is a possibility to include names of 2 constraints in the ON CONFLICT ON CONSTRAINT statement. My sql is below</p>

<pre><code>INSERT INTO LIVE.TABLE (column1, column2, column3)
SELECT DISTINCT ON (cloumn1) column1, column2, column3
FROM STAGE.TABLE
​ON CONFLICT ON CONSTRAINT live.table.pkey DO NOTHING
</code></pre>

<p>This works fine however what i am trying to do is to include second constraint in ON CONFLICT ON CONSTRAINT statement. I have tried below option but it does not seem to work for me.</p>

<pre><code>INSERT INTO LIVE.TABLE (column1, column2, column3)
SELECT DISTINCT ON (cloumn1) column1, column2, column3
FROM STAGE.TABLE
​ON CONFLICT ON CONSTRAINT live.table.pkey, live.table.fkey1 DO NOTHING
</code></pre>

<p>Any suggestion will be highly appreciated.</p>