Subject: [Pljava-dev] Trigger
Date: Tue, 11 Jan 2005 08:15:54 +0100
Message-ID: <thhal-0tRW/Aoknci4AmQeZ/oyCB9oxoI3rcX@mailblocks.com> (raw)
In-Reply-To: <5F4ED4205E00D6119BFE009027DE39090793EFF8@MLSW00103>
References: <5F4ED4205E00D6119BFE009027DE39090793EFF8@MLSW00103>
<41E37D2A.70303@mailblocks.com>
<thhal-0shW/Aocnci4hVqCLbMNMDGJKh/PCXJ@mailblocks.com>
Nageshwar Rao wrote:
>Hi,
>Now I am having a basic doubt. The trigger is after insert trigger for each
>row. When the calling function fails, there is no record inserted in the
>table. Does this mean that it is rolled back when the trigger function
>fails?
>
>
Using PosgreSQL versions prior to 8.0 the answer would be yes. The
transaction is always completely rolled back when an error occurs. In
8.0, savepoints are introduced. They give you a chance to cope with
errors and roll back partially. A trigger can set a savepoint internally
and roll back to that point if it fails and then continue the transaction.
Regards,
Thomas Hallgren
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: pljava-dev@postgresql.org
Subject: Re: [Pljava-dev] Trigger
In-Reply-To: <thhal-0tRW/Aoknci4AmQeZ/oyCB9oxoI3rcX@mailblocks.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