Re: ON CONFLICT DO NOTHING ignored on bulk insert

From: Hellmuth Vargas <hivs77(at)gmail(dot)com>
To: Geoff Winkless <pgsqladmin(at)geoff(dot)dj>
Cc: Andrus <kobruleht2(at)hot(dot)ee>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: ON CONFLICT DO NOTHING ignored on bulk insert
Date: 2021-05-25 13:47:29
Message-ID: CAN3Qy4obiv4xnqFNAw7V+1b2u2RPC+gRn1ww+T4QmkjE6ftHhA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

https://www.postgresql.org/docs/11/sql-insert.html#SQL-ON-CONFLICT

"The optional ON CONFLICT clause specifies an alternative action to raising
a *unique violation or exclusion constraint violation* error."

El mar, 25 de may. de 2021 a la(s) 03:29, Geoff Winkless (
pgsqladmin(at)geoff(dot)dj) escribió:

> On Tue, 25 May 2021 at 08:18, Andrus <kobruleht2(at)hot(dot)ee> wrote:
>
>> Looking for a method to do bulk insert ignoring product foreign key
>> mismatches.
>>
> ON CONFLICT only works with unique constraints, it's not designed for what
> you're trying to use it for.
>
> Geoff
>

--
Cordialmente,

Ing. Hellmuth I. Vargas S.
Esp. Telemática y Negocios por Internet
Oracle Database 10g Administrator Certified Associate
EnterpriseDB Certified PostgreSQL 9.3 Associate

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Lewis 2021-05-25 15:41:42 Re: ON CONFLICT DO NOTHING ignored on bulk insert
Previous Message Poul Kristensen 2021-05-25 13:41:58 Re: Simple question from a beginner: Can I use PostgreSQL as a file database?