Re: SQL-Invoked Procedures for 8.1 - Mailing list pgsql-hackers

From Greg Stark
Subject Re: SQL-Invoked Procedures for 8.1
Date
Msg-id 87sm97ak9h.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: SQL-Invoked Procedures for 8.1  (Peter Mount <peter@retep.org.uk>)
List pgsql-hackers
Peter Mount <peter@retep.org.uk> writes:

> Tom Lane wrote:
> 
> >One interesting point is whether it's possible for one procedure to call
> >another, and if so what that means for the semantics.  Is the inner
> >procedure allowed to commit a transaction started by the outer one?
>
> Usually yes a procedure can call another, and it's extremely useful to do so.
> I'm not so sure about the semantics with transactions, but personally I
> wouldn't like to see a procedure be able to commit the transaction of it's
> caller.

From the quote from the spec referred to earlier it seems the spec anticipates
that by default it wouldn't be able to. At least not able to commit refer to
savepoints from its caller. Presumably that extends to transactions.

However it did provide a way to declare a procedure that could refer to
savepoints from its caller. Conceivably that extends to the overall
transaction as well.


-- 
greg



pgsql-hackers by date:

Previous
From: Maarten Boekhold
Date:
Subject: Re: SQL-Invoked Procedures for 8.1
Next
From: "Hicham G. Elmongui"
Date:
Subject: planner & target lists