plpgsql error handling bug
От | Ivan-Sun1@mail.ru |
---|---|
Тема | plpgsql error handling bug |
Дата | |
Msg-id | 52359326.20040905152502@mail.ru обсуждение исходный текст |
Ответы |
Re: plpgsql error handling bug
Re: plpgsql error handling bug |
Список | pgsql-bugs |
Hello. I found a bug in the behaviour of plpgsql error handling system while trying to handle foreign key violation exception. When this error occured, control doesn't jump to exception handling block. It moves to the next statement instead. When control leaves the function exception is occured. So it's impossible to handle this kind of exception. Furthermore, the FOUND local variable is set to true after insert statement which raises foreign key violation and GET DIAGNOSTICS var = ROW_COUNT set var to 1. Attached file contains sample that shows this bug. Execute fk_violation_bug, fk_violation_bug2 and fk_violation_bug3 plpgsql functions to see this error. --------- I'm using "PostgreSQL 8.0.0beta1 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.2.3 (mingw special 20030504-1)" on OS Name Microsoft Windows XP Professional Version 5.1.2600 Service Pack 2 Build 2600 Thank you. -- Best regards, Ivan mailto:Ivan-Sun1@mail.ru
Вложения
В списке pgsql-bugs по дате отправления: