trigger AFTER INSERT

From: "Josi Perez (3T Systems)" <josiperez3t(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: trigger AFTER INSERT
Date: 2010-08-12 14:58:53
Message-ID: AANLkTinpHpBZQ09BHXhsUoJCwsw4up=yC=n=zJshavnm@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

I think that I have a conceptual problem and I hope anyone could help me.

If I write a trigger AFTER INSERT and I have one error in this trigger, the
record (that I think was already inserted) is not inserted.
Example:

INSERT INTO tableX <record1>
trigger sumRecords AFTER INSERT under tableX to accumulate the records
inserted by hour
if there is an error in the commands executed for this record, <record1> is
not in the tableX

If this occurs in a trigger BEFORE INSERT, I can understand, but, if it is
AFTER INSERT, I believe that the record is already inserted.
What is wrong on it?

Thanks in advance
Josi Perez

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2010-08-12 15:00:26 Re: trigger AFTER INSERT
Previous Message Yeb Havinga 2010-08-12 08:14:59 Re: how do i query the type of an object?