Re: ignore unique violation OR check row exists - Mailing list pgsql-sql

From Jasen Betts
Subject Re: ignore unique violation OR check row exists
Date
Msg-id je14bk$1jq$1@reversiblemaps.ath.cx
Whole thread Raw
In response to Re: ignore unique violation OR check row exists  (Misa Simic <misa.simic@gmail.com>)
List pgsql-sql
On 2012-01-03, Misa Simic <misa.simic@gmail.com> wrote:
> If exists is better, though insert line by line and check if exists may
> be very slow...
>
> The best would be if you can use copy command from csv to staging table
> (without constraints) and then
>
> Insert to live from stage where stage constraint column not exist in
> live...
>

Its a good idea to check that the staging table doesn't
conflict with itself, before tryign to insert it.

-- 
⚂⚃ 100% natural



pgsql-sql by date:

Previous
From: Misa Simic
Date:
Subject: Re: ignore unique violation OR check row exists
Next
From: Andreas Kretschmer
Date:
Subject: Re: ignore unique violation OR check row exists