| From: | thhal at mailblocks(dot)com (Thomas Hallgren) |
|---|---|
| To: | |
| Subject: | [Pljava-dev] Trigger |
| Date: | 2005-01-11 07:15:54 |
| Message-ID: | thhal-0tRW/Aoknci4AmQeZ/oyCB9oxoI3rcX@mailblocks.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pljava-dev |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas Hallgren | 2005-01-24 00:03:47 | [Pljava-dev] ANN: PLJava 1.0.0 released |
| Previous Message | Nageshwar Rao | 2005-01-11 06:36:47 | [Pljava-dev] Trigger |