Re: function transaction scope question

From: "Wright, George" <George(dot)Wright(at)infimatic(dot)com>
To: "John DeSoi" <desoi(at)pgedit(dot)com>
Cc: "PostgreSQL List - Novice" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: function transaction scope question
Date: 2009-01-15 13:43:07
Message-ID: 51548D6D5BEB57468163194A8C1A0E980161AB27@MAGPTCPEXC02.na.mag-ias.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2009-01-15 15:03:30 Re: order by differences: locale problem?
Previous Message Raphael Bauduin 2009-01-15 11:29:17 order by differences: locale problem?