Yasin, thank you for this suggestion, but -
Have you tried with inner block and do nothing on exception;BEGIN<your code>..............BEGINUPDATE words_socialSET 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