On Apr 22, 2011, at 11:10 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
>> Merlin Moncure <mmoncure@gmail.com> wrote:
>>> wouldn't it be better if the current crop of language handlers
>>> could run procedures without major changes? C functions with SPI?
>>> However it's internally implemented, the more userland mindspace
>>> recovered for use of writing procedures the better off we are.
>
>> +1
>
> I'd like a pony, too. Let's be perfectly clear about this: there is no
> part of plpgsql that can run outside a transaction today, and probably
> no part of the other PLs either, and changing that "without major
> changes" is wishful thinking of the first order.
Correct me if I am wrong here, but the basic issue is, I think, that an error might occur. And transactions are how we
makesure that when control returns to the top level, we've released any heavyweight locks, lightweight locks, buffer
pins,backend-local memory allocations, etc. that we were holding when the error occurred.
...Robert