Subject RE: [Firebird-Architect] Re: External procedures: call for discussion
Author Dmitry Yemanov
Geoff,

> I also use this trick, but was recently advised that it _may_
> not supported in the future because SUSPEND should always and
> only be used inside a FOR...SELECT loop.

This is the first time I hear about that.

> And before I get barred from asking a support question, this
> is an architectural question. Do you (or anyone else here)
> have any opinions on whether stored procedures along the lines
> of:
>
> // singleton return
> CREATE PROCEDURE .... RETURNS ...
> BEGIN
> ...
> SUSPEND; // return from outside any FOR..SELECT
> END^
>
> and perhaps:
>
> // multi-row return
> CREATE PROCEDURE .... RETURNS ...
> BEGIN
> ...
> SUSPEND; // return from outside any FOR..SELECT
> ...
> SUSPEND; // return from outside any FOR..SELECT
> END^
>
> will be acceptable and supported in the long term?

Certainly. This is a power of our selectable SPs. They were never required
to contain RSEs (read: selects) in any form.

> Is this capability one which the currently active developers
> Firebird intend to explicitly keep or explicitly deny in the
> future?

I intend to explicitly keep it. Architecturally, SUSPEND has nothing to do
with loops, FOR SELECT included. It's just a way to stall a procedural
request and use the current output param values in any way. And I see no
reason to change this stuff.


Dmitry