Re: COMMIT within function?
| От | Dawid Kuroczko |
|---|---|
| Тема | Re: COMMIT within function? |
| Дата | |
| Msg-id | 758d5e7f04112202307dd7a540@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: COMMIT within function? (Michael Fuhr <mike@fuhr.org>) |
| Список | pgsql-general |
On Sun, 21 Nov 2004 20:10:03 -0700, Michael Fuhr <mike@fuhr.org> wrote: http://developer.postgresql.org/docs/postgres/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING > > BEGIN > DELETE FROM values WHERE value_id = r.value_id; > EXCEPTION > WHEN foreign_key_violation THEN > NULL; > END; Ahh, exactly what I was looking for. :) The thing I didn't notice was that, while exception causes rollback to "BEGIN", it does not mean to the beginning of the function. In other words I didn't nest BEGIN...END blocks and all I got from using exceptions was that they did not show any errors. :) Thank you! I am now enlightened. This works perfect, exactly as I hoped it would. :) Regards, dawid
В списке pgsql-general по дате отправления: