Re: Bug in copy
От | Laurenz Albe |
---|---|
Тема | Re: Bug in copy |
Дата | |
Msg-id | b9e99ded23e0b40822f028fdf0a34dfb02a4c1c4.camel@cybertec.at обсуждение исходный текст |
Ответ на | Re: Bug in copy (me nefcanto <sn.1361@gmail.com>) |
Список | pgsql-bugs |
On Sun, 2025-02-09 at 16:00 +0330, me nefcanto wrote: > @laurenz if I use `insert into` or the `merge` would I be able to bypass records > with errors? Or would I fail there too? I mean there are lots of ways a record > can be limited. Unique indexes, check constraints, foreign key constraints, etc. > What happens in those cases? With INSERT ... ON CONFLICT, you can only handle primar and unique key violations. MERGE allows some more freedom, but it also only checks for rows that match existing rows. You won't find a command that ignores or handles arbitrary kinds of errors. You have to figure out what kinds of errors you expect and handle them explicitly by running queries against the data. I don't think that a catch-it-all handler that handles all errors would be very useful. Normally, there are certain errors you want to tolerate, while others should be considered unrecoverable and lead to errors. Yours, Laurenz Albe
В списке pgsql-bugs по дате отправления: