Re: "stored procedures"

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: "stored procedures"
Date: 2011-04-22 15:27:50
Message-ID: DDF0C31E-9C9F-45D9-BE3F-3548E2565603@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Apr 22, 2011, at 11:10 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
>> Merlin Moncure <mmoncure(at)gmail(dot)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 make sure 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2011-04-22 15:41:42 Re: "stored procedures"
Previous Message Kevin Grittner 2011-04-22 15:27:15 Re: What Index Access Method Functions are really needed?