I want skip the error, and continue to copy the reset of tuple. The result
will be that there are two rows in table A: 1 and 2.
how to implement that ? Anybody give me some suggestion?
you should to reimplement a copy procedure to use a subtransactions. Using subtransaction for any row is too expensive, but you can do subtransaction per 1000 rows, and when some exception is raised, then store data per one row/one subtransaction.