multiple conflict targets

From: Torsten Förtsch <tfoertsch123(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: multiple conflict targets
Date: 2018-08-10 10:12:40
Message-ID: CAKkG4_m_EMZ5Rbfk8CY5P5JdGoupRVWh2STXE=dU+Lqs=E3uqw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

if I read https://www.postgresql.org/docs/9.6/static/sql-insert.html
correctly there can be only one conflict target or none at all.

What if I have a table with 3 unique constraints? If the first one is
violated by the insert I want to do nothing. If the 2nd is violated some
fields should be updated. And violation of the 3rd one should raise an
error.

Can that be expressed?

Thanks,
Torsten

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Verite 2018-08-10 10:34:37 Re: Postgres - search for value throughout many tables?
Previous Message Adrien NAYRAT 2018-08-10 09:59:09 Re: Postgres - search for value throughout many tables?