On Thu, Apr 21, 2011 at 8:34 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Apr 21, 2011, at 3:51 PM, Merlin Moncure <mmoncure@gmail.com> wrote:
>> If you do it that (base it on AT) way, then you can't:
>> 1) call any utility command (vacuum, etc)
>> 2) run for an arbitrary amount of time
>> 3) discard any locks (except advisory)
>> 4) deal with serialization isolation/mvcc snapshot issues that plague functions.
>
> It is not obvious to me that you cannot do these things.
yeah...I think I misunderstood what you were saying ("When you enter a
stored procedure at the outermost level, you begin a transaction...").Those restrictions only apply when there is a
opentransaction
controlling the context of what is running. If you are handing the
command textually off to another backend which then runs it, then you
are mostly good...although #2 still might be a problem, and #3 if you
happen to grab any.
merlin