Subject | Re: [Firebird-Architect] Re: External procedures: call for discussion |
---|---|
Author | Geoff Worboys |
Post date | 2004-04-04T10:18:17Z |
> Secondly, some people (me included) use such tricksDmitry,
> to emulate stored functions - adding SUSPEND to a singleton
> procedure allows it to be executed either via EXECUTE inside
> PSQL, or via SELECT inside some query.
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. (And perhaps you do
place your trick suspends inside a dummary FOR..SELECT??)
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?
These both work now - and I do understand the hazards if
such procedures are called via EXECUTE PROCEDURE.
Is this capability one which the currently active developers
Firebird intend to explicitly keep or explicitly deny in the
future?
--
Geoff Worboys
Telesis Computing