FirebirdSQL logo

RDB$PROCEDURES

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

Column Name Data Type Description

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 (PSQL procedures only)

RDB$SECURITY_CLASS

CHAR(63)

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

RDB$OWNER_NAME

CHAR(63)

The username of the procedure’s Owner — the user who was CURRENT_USER when the procedure was first created.It may or may not be the username 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

RDB$PROCEDURE_PARAMETERS

RDB$PROCEDURE_PARAMETERS stores the parameters of stored procedures and their attributes.It holds one row for each parameter.

Column Name Data Type Description

RDB$PARAMETER_NAME

CHAR(63)

Parameter name

RDB$PROCEDURE_NAME

CHAR(63)

The name of the procedure where the parameter is defined

RDB$PARAMETER_NUMBER

SMALLINT

The sequential number of the parameter

RDB$PARAMETER_TYPE

SMALLINT

Indicates whether the parameter is for input (value 0) or output (value 1)

RDB$FIELD_SOURCE

CHAR(63)

The name of the user-created domain, when a domain is referenced instead of a data type.If the name starts with the prefix “RDB$”, it is the name of the domain automatically generated by the system for the parameter.

RDB$DESCRIPTION

BLOB TEXT

Could store comments related to the parameter

RDB$SYSTEM_FLAG

SMALLINT

Indicates whether the parameter was defined by the system (value or greater) or by a user (value 0)

RDB$DEFAULT_VALUE

BLOB BLR

The binary language representation (BLR) of the default value of the parameter

RDB$DEFAULT_SOURCE

BLOB TEXT

The default value for the parameter, in PSQL code

RDB$COLLATION_ID

SMALLINT

The identifier of the collation used for a character parameter

RDB$NULL_FLAG

SMALLINT

The flag indicating whether NULL is allowable

RDB$PARAMETER_MECHANISM

SMALLINT

Flag: indicates how this parameter is passed:

0 - by value
1 - by reference
2 - by descriptor
3 - by BLOB descriptor

RDB$FIELD_NAME

CHAR(63)

The name of the column the parameter references, if it was declared using TYPE OF COLUMN instead of a regular data type.Used in conjunction with RDB$RELATION_NAME (see next).

RDB$RELATION_NAME

CHAR(63)

The name of the table the parameter references, if it was declared using TYPE OF COLUMN instead of a regular data type

RDB$PACKAGE_NAME

CHAR(63)

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

RDB$PUBLICATIONS

RDB$PUBLICATIONS stores the replication publications defined in the database.

Column Name Data Type Description

RDB$PUBLICATION_NAME

CHAR(63)

Publication name

RDB$OWNER_NAME

CHAR(63)

The username of the user who created the publication

RDB$SYSTEM_FLAG

SMALLINT

Flag:

0 - user-defined
1 or higher - system-defined

RDB$ACTIVE_FLAG

SMALLINT

Inactive (0) or active (1)

RDB$AUTO_ENABLE

SMALLINT

Automatically add new tables to publication:

0 - disabled
1 - enabled (tables are automatically added to this publication)

Note

In Firebird 5.0 there is a single (pre-defined) publication named RDB$DEFAULT.User-defined publications will be available in future Firebird releases.

RDB$PUBLICATION_TABLES

RDB$PUBLICATION_TABLES stores the names of tables that are replicated as part of a publication.

Column Name Data Type Description

RDB$PUBLICATION_NAME

CHAR(63)

Publication name

RDB$TABLE_NAME

CHAR(63)

Table name