Re: function transaction scope question - Mailing list pgsql-novice

From Wright, George
Subject Re: function transaction scope question
Date
Msg-id 51548D6D5BEB57468163194A8C1A0E980161AB27@MAGPTCPEXC02.na.mag-ias.net
Whole thread Raw
In response to Re: function transaction scope question  (John DeSoi <desoi@pgedit.com>)
Responses Re: function transaction scope question
List pgsql-novice
On Jan 14, 2009, at 9:41 AM, Wright, George wrote:

> If a function in PL/pgSQL is wrapped by a transaction, does that
> same single transaction encompass other functions defined elsewhere
> that this function calls?

Yes, they all share the same transaction scope. And PL/pgSQL functions
cannot change the transaction state (i.e. call commit or start a new
transaction).


John DeSoi, Ph.D.


-----------

Then if there is a large amount of code all wrapped by a single
transaction and it hangs somewhere in the code, what technique can be
used to abort the transaction? (It's not really a deadlock)

Thanks.

pgsql-novice by date:

Previous
From: Raphael Bauduin
Date:
Subject: order by differences: locale problem?
Next
From: Tom Lane
Date:
Subject: Re: order by differences: locale problem?