Subject Fwd: [Firebird-devel] External procedures: call for discussion
Author Roman Rokytskyy
* Forwarded by Roman Rokytskyy <rrokytskyy@...>
* From: "Samofatov, Nickolay" <Nickolay@...>
* Date: Wed, 31 Mar 2004 16:54:51 -0500
* To: "Roman Rokytskyy" <rrokytskyy@...>
* Subj: RE: [Firebird-devel] External procedures: call for discussion

There is a couple of issues not covered in this memo: the problems of
atomicity, exception handling and transaction management.

Firebird users generally not expect commit happening due to stored
procedure call. Also procedure-level savepoint is needed to ensure
statement atomicity. Both are needed to ensure proper handling of
exceptions coming out of external procedures. At the same time some
"batch" procedures may want to manipulate transaction context.

To make this work I would create a special type of procedures AUTONOMOUS
in Oracle terminology which execute in their own transaction context,
control it and commit as often as they need without affecting global user
context. This is what we can do without breaking existing model of
statement exection and exception handling.

PL/SQL is a different beast and will require some more work because it
allows manipulating global transaction context and has completely
different model of exception handling from what is used in Firebird now.

PL/SQL conceptually sits between the user and SQL engine and it will
require some very careful througt to integrate into the engine. We do not
want to repeat Microsoft mess they have with transaction control in

Nickolay Samofatov

>> -----Original Message-----
>> From: Roman Rokytskyy [mailto:rrokytskyy@...]
>> Sent: Wednesday, March 31, 2004 4:18 PM
>> To: Samofatov, Nickolay; firebird-devel@...
>> Subject: Re: [Firebird-devel] External procedures: call for
>> discussion

>> Hi,

>>> I'll be very glad to review and comment this paper, but could you
>>> please publish it somewhere else or post it to me directly
>> because I
>>> have troubles accessing Yahoo! area.

>> Ok, alternatively you can download it from


>> Roman

With best regards, Roman Rokytskyy. E-mail: rrokytskyy@...