Re: Triggers after insert - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Triggers after insert
Date
Msg-id Pine.BSF.4.21.0110251633200.62091-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Triggers after insert  (Fran Fabrizio <ffabrizio@mmrd.com>)
List pgsql-general
On Thu, 25 Oct 2001, Fran Fabrizio wrote:

>
> I seem to be observing that on a trigger I've created to fire
> AFTER INSERT, if I intentionally introduce some sort of syntax error to
> the trigger for example, and insert a row, the row does not appear in
> the table, even though I've declared it to fire after insert.  Shouldn't
> that row be there regardless of whether the trigger does or does not
> fire successfully?  Or is this currently not how it works?  The docs
> seemed to indicate that it would work that way.

I think the syntax error is an error condition which will cause a
rollback.  Technically, that would mean your row was inserted and then
rolled back.

> The end result is that I need to make sure the insert happens whether or
> not the trigger is successful.

I don't think you can get this right now using triggers.


pgsql-general by date:

Previous
From: "Cornelia Boenigk"
Date:
Subject: Re: ARRAY type and PHP
Next
From: Tatsuo Ishii
Date:
Subject: Re: UNICODE