Re: Trigger (Transaction related)

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Harpreet Dhaliwal <harpreet(dot)dhaliwal01(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Trigger (Transaction related)
Date: 2006-09-01 07:55:07
Message-ID: 20060901075507.GH12644@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Sep 01, 2006 at 03:33:55AM -0400, Harpreet Dhaliwal wrote:
> Thats OK, but my question is why did the original insert not take place.
> Syntax error was in the select query that is fired as a result of the
> trigger

The trigger is part of the transaction. If the trigger fails, so does
the whole transaction.

It would be kinda silly if a transaction was allowed to succeed even
though not all the triggers were run.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message karthick muthu 2006-09-01 08:08:01 argue
Previous Message Martijn van Oosterhout 2006-09-01 07:52:43 Re: SPI_execute (result of a select statement)