From: Carlos Moreno <moreno@mochima.com>
To: pgsql-sql@postgresql.org
Subject: Update aborted if trigger function fails?
Date: Mon, 11 Apr 2005 16:29:51 -0400
Message-ID: <425ADE3F.1090206@mochima.com> (raw)
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
--
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: moreno@mochima.com
Subject: Re: Update aborted if trigger function fails?
In-Reply-To: <425ADE3F.1090206@mochima.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox