Re: Partial update on an postgres upsert violates constraint

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Partial update on an postgres upsert violates constraint
Дата
Msg-id 32134.1479589039@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Partial update on an postgres upsert violates constraint  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы Re: Partial update on an postgres upsert violates constraint
Список pgsql-general
Adrian Klaver <adrian.klaver@aklaver.com> writes:
> ... So looks like constraints are checked before you get to the ON CONFLICT section.

Right.  ON CONFLICT is a means for dealing with duplicate-key errors in
the specified (or inferred) unique index.  It is *not* an all-purpose
error catcher.  In the case at hand, the given INSERT request fails due
to not-null constraints that are unrelated to what the ON CONFLICT clause
tests for.

            regards, tom lane


В списке pgsql-general по дате отправления: