Re: BUG #2370: 25P02,current transaction is aborted, commands ignored until end of transaction block
В списке pgsql-bugs по дате отправления:
| От | Alvaro Herrera |
|---|---|
| Тема | Re: BUG #2370: 25P02,current transaction is aborted, commands ignored until end of transaction block |
| Дата | |
| Msg-id | 20060403003647.GB27131@surnet.cl обсуждение |
| Ответ на | BUG #2370: 25P02,current transaction is aborted, commands ignored until end of transaction block ("Amaresh Wakkar" <babu_moshay@indiatimes.com>) |
| Список | pgsql-bugs |
Amaresh Wakkar wrote: > 3.In one of the inserts we must ignore the failure due to duplicate rows i.e > Error state 23505 and continue with remainder set of inserts. Presence of > duplicate rows will not be treated as an error condition in this context and > system must function normally without aborting the whole transaction (This > is what PostgreSQL is doing currently after first failure I get 25P02 and > all other inserts are ignored completely). I get following error: > > org.postgresql.util.PSQLException: ERROR: current transaction is aborted, > commands ignored until end of transaction block Sure. You can set a SAVEPOINT before trying the insert; if it fails, ROLLBACK TO said savepoint and you can continue merrily with the rest of your transaction. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера