D.24 RDB$PROCEDURES

RDB$PROCEDURES stores the definitions of stored procedures, including their PSQL source code and the binary language representation (BLR) of it. The next table, RDB$PROCEDURE_PARAMETERS, stores the definitions of input and output parameters.

Column NameData TypeDescription

RDB$PROCEDURE_NAME

CHAR(63)

Stored procedure name (identifier)

RDB$PROCEDURE_ID

SMALLINT

The procedure’s unique, system-generated identifier

RDB$PROCEDURE_INPUTS

SMALLINT

Indicates the number of input parameters. NULL if there are none

RDB$PROCEDURE_OUTPUTS

SMALLINT

Indicates the number of output parameters. NULL if there are none

RDB$DESCRIPTION

BLOB TEXT

Any text comments related to the procedure

RDB$PROCEDURE_SOURCE

BLOB TEXT

The PSQL source code of the procedure

RDB$PROCEDURE_BLR

BLOB BLR

The binary language representation (BLR) of the procedure code

RDB$SECURITY_CLASS

CHAR(63)

May point to the security class defined in the system table RDB$SECURITY_CLASSES in order to apply access control limits

RDB$OWNER_NAME

CHAR(63)

The user name of the procedure’s Owner — the user who was CURRENT_USER when the procedure was first created. It may or may not be the user name of the author.

RDB$RUNTIME

BLOB

A metadata description of the procedure, used internally for optimization

RDB$SYSTEM_FLAG

SMALLINT

Indicates whether the procedure is defined by a user (value 0) or by the system (a value of 1 or greater)

RDB$PROCEDURE_TYPE

SMALLINT

Procedure type:

1 - selectable stored procedure (contains a SUSPEND statement) 2 - executable stored procedure NULL - not known

for procedures created before Firebird 1.5

RDB$VALID_BLR

SMALLINT

Indicates whether the source PSQL of the stored procedure remains valid after the latest ALTER PROCEDURE modification

RDB$DEBUG_INFO

BLOB DEBUG_INFORMATION

Contains debugging information about variables used in the stored procedure

RDB$ENGINE_NAME

CHAR(63)

Engine for external functions. ‘UDR’ for UDR procedures. NULL for PSQL stored procedures

RDB$ENTRYPOINT

CHAR(255)

The exported name of the external function in the procedure library. Note, this is often not the same as RDB$PROCEDURE_NAME, which is the identifier with which the external stored procedure is declared to the database

RDB$PACKAGE_NAME

CHAR(63)

Package name of the procedure (or NULL for a top-level stored procedure)

RDB$PRIVATE_FLAG

SMALLINT

NULL for normal (top-level) stored procedures, 0 for package procedures defined in the header, 1 for package procedures only defined in the package body.

RDB$SQL_SECURITY

BOOLEAN

The SQL SECURITY mode (DEFINER or INVOKER):

NULL - initial default (INVOKER) FALSE - INVOKER TRUE - DEFINER