Re: Triggers after insert

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Fran Fabrizio <ffabrizio(at)mmrd(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Triggers after insert
Date: 2001-10-25 23:35:14
Message-ID: Pine.BSF.4.21.0110251633200.62091-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2001-10-25 23:50:59 Re: [LONGINT] Problem
Previous Message Cornelia Boenigk 2001-10-25 23:32:24 Re: ARRAY type and PHP