Update aborted if trigger function fails?
| От | Carlos Moreno |
|---|---|
| Тема | Update aborted if trigger function fails? |
| Дата | |
| Msg-id | 425ADE3F.1090206@mochima.com обсуждение исходный текст |
| Ответы |
Re: Update aborted if trigger function fails?
|
| Список | pgsql-sql |
Hi, I just noticed this (odd?) behaviour, and it kind of scares me. For testing purposes, I put a deliberate syntax error; this wouldn't happen in a real-life situation. But what if the error gets triggered by something that happens later on? say, if the trigger function uses a field that later on gets dropped from the table -- something that was working fine all of a sudden produces syntax errors while executing the function (I just verified, to see if the server would let me drop a column that is being referenced by a function invoked by an active trigger, and it did let me drop it). Isn't this a little fragile? Is there something I could do to avoid this situation? Should trigger functions be extremely simple as to guarantee that an error would never happen? Thanks, Carlos --
В списке pgsql-sql по дате отправления: