Subject | Re: [Firebird-Architect] Re: RFC: Please unify stored procedure execution |
---|---|
Author | Jim Starkey |
Post date | 2004-12-22T15:21:56Z |
Let me extend my most proposal a little:
1. We define a column RDB$PROCEDURE_TYPE in RDB$PROCEDURES. The
defined values are 0 (unknown), 1 (returns records), and 2
(returns values).
2. An an appropriate time, the engine is modified to create and
maintain the field. The procedure compiler is modified such that
the presence of "SUSPEND" in a procedure determines its procedure
type.
3. We write a user level program that creates RDB$PROCEDURE_TYPE and
sets the types of all procedures of type unknown based on a BLR
analysis of the procedure.
4. Jaybird examines RDB$PROCEDURE_TYPE when handling
Connection.prepareCall. If the column does not exist or is type
unknown, it assumes (Jaybird's choice).
5. Gbak is extended to save and restore RDB$PROCEDURE_TYPE.
The only people who would ever need to the the ad hoc program are
Jaybird users wishing in invoke a procedure through
Connection.prepareCall of the non-Jaybird default type. Other people
might want to run it for cleanliness.
I believe this solves all known problems with a bare minimum of code.
It can be implemented immediately and works against all versions of
Firebird and all post-V4 versions of Interbase. It does not work with
either Rdb/ELN or Netfrastructure.
1. We define a column RDB$PROCEDURE_TYPE in RDB$PROCEDURES. The
defined values are 0 (unknown), 1 (returns records), and 2
(returns values).
2. An an appropriate time, the engine is modified to create and
maintain the field. The procedure compiler is modified such that
the presence of "SUSPEND" in a procedure determines its procedure
type.
3. We write a user level program that creates RDB$PROCEDURE_TYPE and
sets the types of all procedures of type unknown based on a BLR
analysis of the procedure.
4. Jaybird examines RDB$PROCEDURE_TYPE when handling
Connection.prepareCall. If the column does not exist or is type
unknown, it assumes (Jaybird's choice).
5. Gbak is extended to save and restore RDB$PROCEDURE_TYPE.
The only people who would ever need to the the ad hoc program are
Jaybird users wishing in invoke a procedure through
Connection.prepareCall of the non-Jaybird default type. Other people
might want to run it for cleanliness.
I believe this solves all known problems with a bare minimum of code.
It can be implemented immediately and works against all versions of
Firebird and all post-V4 versions of Interbase. It does not work with
either Rdb/ELN or Netfrastructure.