Re: Transactions, Triggers and Error Messages
От | Tom Lane |
---|---|
Тема | Re: Transactions, Triggers and Error Messages |
Дата | |
Msg-id | 9566.1131489750@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Transactions, Triggers and Error Messages (Ledina Hido <lh1101@ecs.soton.ac.uk>) |
Список | pgsql-general |
Ledina Hido <lh1101@ecs.soton.ac.uk> writes: > Now when I run the following (after inserting person with id=5 into > pers table): > begin; > set constraints all deferred; > insert into tasks (pid, task) values (5, 'firstTask'); > insert into tasks (pid, task) values (5, 'secondTask'); > insert into tasks (pid, task) values (5, 'thirdTask'); > insert into tasks (pid, task) values (5, 'forthTask'); > insert into tasks (pid, task) values (5, 'fifthTask'); > commit; > the transaction is correctly aborted but the error message I get is > not the one that raised the exception ie "3 tasks already exists for > person with pid 5" but the one from trying to insert the fifth task > (ie last statement) which is "ERROR: current transaction is aborted, > commands ignored until end of transaction block" What are you running this in? ISTM this is a problem with bad structure of client-side code, not something to be fixed on the server side. regards, tom lane
В списке pgsql-general по дате отправления: