Re: trigger help - Mailing list pgsql-general

From Christopher Browne
Subject Re: trigger help
Date
Msg-id d6d6637f0608220655r6d2b7d90qc4932af08ac282e0@mail.gmail.com
Whole thread Raw
In response to trigger help  (marcelo Cortez <jmdc_marcelo@yahoo.com.ar>)
List pgsql-general
On 8/22/06, marcelo Cortez <jmdc_marcelo@yahoo.com.ar> wrote:
>  I think my trigger need transaction ,but the pgsql
> compiler refuse to compile 'begin .. commit ' sequence
> I use the perform , to do the works

Stored functions already execute inside the context of some
already-running transaction.  You don't run multiple transactions
inside a function.

Further, when this is a trigger function, there is a very clear
transaction with which the activity of the trigger is already
associated.  If you were to start another transaction at the point
where you try to do so, that would break the processing of any further
triggers that might run after this one...
--
http://www3.sympatico.ca/cbbrowne/linux.html
Oddly enough, this is completely standard behaviour for shells. This
is a roundabout way of saying `don't use combined chains of `&&'s and
`||'s unless you think Gödel's theorem is for sissies'.

pgsql-general by date:

Previous
From: marcelo Cortez
Date:
Subject: trigger help
Next
From: Alban Hertroys
Date:
Subject: Re: Queries joining views