Re: [GENERAL] UPDATE ... ON CONFLICT DO NOTHING - Mailing list pgsql-general

From Alexander Farber
Subject Re: [GENERAL] UPDATE ... ON CONFLICT DO NOTHING
Date
Msg-id CAADeyWhRZstu0f8Dca2NOTXPxUox6MG=W-s3XsiX_XGwD84Upw@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] UPDATE ... ON CONFLICT DO NOTHING  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
Yasin, thank you for this suggestion, but -

On Tue, Mar 14, 2017 at 12:07 PM, Yasin Sari <yasinsari81@googlemail.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
 

pgsql-general by date:

Previous
From: Chris Withers
Date:
Subject: Re: [GENERAL] options for logical replication plugins?
Next
From: Антон Тарабрин
Date:
Subject: Re: [GENERAL] Table not cleaning up drom dead tuples