| От | Edmar Wiggers |
|---|---|
| Тема | RE: how to continue a transaction after an error? |
| Дата | |
| Msg-id | NEBBIAKDCDHFGJMLHCKIGECLCBAA.edmar@brasmap.com обсуждение исходный текст |
| Ответ на | how to continue a transaction after an error? ("Cristi Petrescu-Prahova" <cristipp@lasting.ro>) |
| Список | pgsql-sql |
I believe the known mechanism to cope with errors inside transactions are savepoints. That doesn't seem to be the case, though. If you don't care if some inserts fail, then you have multiple transactions instead of just one (use autocommit). If you want a transaction, check existence before each insert. That's the way to do it. > -----Original Message----- > I would like to insert a bunch of rows in a table in a > transaction. Some of > the insertions will fail due to constraints violation. When this happens, > Postgres automatically ends the transaction and rolls back all > the previous > inserts. I would like to continue the transaction and issue the > commit/rollback command myself.
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера