Re: UPDATE ... ON CONFLICT DO NOTHING

From: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
To:
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: UPDATE ... ON CONFLICT DO NOTHING
Date: 2017-03-16 07:43:40
Message-ID: CAADeyWhRZstu0f8Dca2NOTXPxUox6MG=W-s3XsiX_XGwD84Upw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Yasin, thank you for this suggestion, but -

On Tue, Mar 14, 2017 at 12:07 PM, Yasin Sari <yasinsari81(at)googlemail(dot)com>
wrote:

​​
>> Have you tried with inner block and do nothing on exception;
>>
>
>
>> BEGIN
>>
>> <your code>
>> ..............
>> BEGIN
>>
>> UPDATE words_social
>> SET uid = out_uid
>> WHERE uid = ANY(_uids);
>>
>> EXCEPTION WHEN OTHERS THEN
>> --do nothing or write NULL means do nothing
>>
>>
>
>
but it seems to me that my method of INSERTing copies would be faster than
the 2 loops

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Антон Тарабрин 2017-03-16 14:32:02 Re: Table not cleaning up drom dead tuples
Previous Message Chris Withers 2017-03-16 06:50:51 Re: options for logical replication plugins?