Re: Best strategy for bulk inserts where some violate unique constraint?

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: Denis Papathanasiou <denis(dot)papathanasiou(at)gmail(dot)com>
Cc: "psycopg(at)postgresql(dot)org" <psycopg(at)postgresql(dot)org>
Subject: Re: Best strategy for bulk inserts where some violate unique constraint?
Date: 2013-11-06 14:54:15
Message-ID: 527A5817.8020805@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On 11/06/2013 06:50 AM, Denis Papathanasiou wrote:
> On Tue, Nov 5, 2013 at 6:31 PM, Daniele Varrazzo

>
>
> I saw Adrian's reply about how this still won't do what I need in terms
> of ignoring the constraint violators and keeping the valid entries; will
> switching autocommit to True first have the desired effect?

No, a particular COPY is treated as a single transaction.

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message Daniele Varrazzo 2013-11-06 15:02:32 Re: Best strategy for bulk inserts where some violate unique constraint?
Previous Message Denis Papathanasiou 2013-11-06 14:52:00 Re: Best strategy for bulk inserts where some violate unique constraint?