Re: trigger help

From: "Christopher Browne" <cbbrowne(at)gmail(dot)com>
To: "marcelo Cortez" <jmdc_marcelo(at)yahoo(dot)com(dot)ar>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: trigger help
Date: 2006-08-22 13:55:11
Message-ID: d6d6637f0608220655r6d2b7d90qc4932af08ac282e0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 8/22/06, marcelo Cortez <jmdc_marcelo(at)yahoo(dot)com(dot)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'.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2006-08-22 13:59:12 Re: Queries joining views
Previous Message marcelo Cortez 2006-08-22 13:38:31 trigger help