Subject | Re: [Firebird-Architect] RFC: Please unify stored procedure |
---|---|
Author | Jim Starkey |
Post date | 2004-12-21T21:49:22Z |
Vlad Horsun wrote:
procedure to contain a "suspend" is to return a record, and a procedure
that doesn't contain a "suspend" can't return records, so it isn't the
least ambiguous.
The difference is that the decision is made by the compiler. Nobody
else has to understand the blr, or where the blr would have been if we
hadn't trashed it in favor of something slightly more up to date.
procedures correctly and transparently without changing or extending
syntax. I wouldn't have designed procedures the way Borland did, but
it's done, and it's better that we live with it than upset everyone and
change the syntax for no great benefit. We have all the information we
need to tag procedures by type in the metadata at procedure definition time.
--
Jim Starkey
Netfrastructure, Inc.
978 526-1376
> SUSPEND you mean, not suspect ?Indeed. What the senator meant to say was "suspend".
>
>
>
>>If someone wants to get cute and put a suspend where it doesn't belong,Exactly. That is a pointless thing to do.
>>he will get something unpredictable, which is only justice.
>>
>>
>
> How this differ from current situation ?
>
>Now: if developer don't put SUSPEND and do SELECT he has no result
>"which is only justice", imho
>
>
>New: if developer put SUSPEND like this - IF(<false condition>) THEN SUSPENDNo, of course not. The compiler sees "suspend". It's not at all ambiguous.
>"he will get something unpredictable, which is only justice"
>
>
> Where is solution ? In any case we don't declare that procedure mustPerhaps I've missed something important, but the only reason for a
>have resultset. By the way - what is resultset ? Is empty set is valid resultset
>
>
>
procedure to contain a "suspend" is to return a record, and a procedure
that doesn't contain a "suspend" can't return records, so it isn't the
least ambiguous.
The difference is that the decision is made by the compiler. Nobody
else has to understand the blr, or where the blr would have been if we
hadn't trashed it in favor of something slightly more up to date.
>I see 2 ways we can go :I don't see any reason that Jaybird can't support both types of
>a) JDBC will do SELECT from SP and Java developers will write right SP's
>b) we invent declarative way to force SP to return not empty resultset and
>raise error if SP don't return it, for example
> CREATE PROCEDURE xxx (...) RETURNS (...) WITH RESULT
>or even
> EXECUTE PROCEDURE xxx RETURNING ... WITH RESULT
>but it seems ugly for me
>
>
>
procedures correctly and transparently without changing or extending
syntax. I wouldn't have designed procedures the way Borland did, but
it's done, and it's better that we live with it than upset everyone and
change the syntax for no great benefit. We have all the information we
need to tag procedures by type in the metadata at procedure definition time.
--
Jim Starkey
Netfrastructure, Inc.
978 526-1376