FirebirdSQL logo

RDB$AUTH_MAPPING

RDB$AUTH_MAPPING stores authentication and other security mappings.

Column Name Data Type Description

RDB$MAP_NAME

CHAR(63)

Name of the mapping

RDB$MAP_USING

CHAR(1)

Using definition:

P - plugin (specific or any)
S - any plugin serverwide
M - mapping
* - any method

RDB$MAP_PLUGIN

CHAR(63)

Mapping applies for authentication information from this specific plugin

RDB$MAP_DB

CHAR(63)

Mapping applies for authentication information from this specific database

RDB$MAP_FROM_TYPE

CHAR(63)

The type of authentication object (defined by plugin) to map from, or * for any type

RDB$MAP_FROM

CHAR(255)

The name of the authentication object to map from

RDB$MAP_TO_TYPE

SMALLINT

The type to map to

0 - USER
1 - ROLE

RDB$MAP_TO

CHAR(63)

The name to map to

RDB$SYSTEM_FLAG

SMALLINT

Flag:

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

RDB$DESCRIPTION

BLOB TEXT

Optional description of the mapping (comment)

RDB$EXCEPTIONS

RDB$EXCEPTIONS stores custom database exceptions.

Column Name Data Type Description

RDB$EXCEPTION_NAME

CHAR(63)

Custom exception name

RDB$EXCEPTION_NUMBER

INTEGER

The unique number of the exception assigned by the system

RDB$MESSAGE

VARCHAR(1021)

Exception message text

RDB$DESCRIPTION

BLOB TEXT

Could store text description of the exception

RDB$SYSTEM_FLAG

SMALLINT

Flag:

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

RDB$SECURITY_CLASS

CHAR(63)

May reference a security class defined in the table RDB$SECURITY_CLASSES, to apply access control limits to all users of this exception

RDB$OWNER_NAME

CHAR(63)

The username of the user who created the exception originally

RDB$FIELDS

RDB$FIELDS stores definitions of columns and domains, both system and custom.This is where the detailed data attributes are stored for all columns.

Note

The column RDB$FIELDS.RDB$FIELD_NAME links to RDB$RELATION_FIELDS.RDB$FIELD_SOURCE, not to RDB$RELATION_FIELDS.RDB$FIELD_NAME.

Column Name Data Type Description

RDB$FIELD_NAME

CHAR(63)

The unique name of the domain created by the user or of the domain automatically built for the table column by the system.System-created domain names start with the “RDB$” prefix

RDB$QUERY_NAME

CHAR(63)

Not used

RDB$VALIDATION_BLR

BLOB BLR

The binary language representation (BLR) of the expression of the CHECK constraint of a domain

RDB$VALIDATION_SOURCE

BLOB TEXT

The original source text in the SQL language specifying the check of the CHECK value

RDB$COMPUTED_BLR

BLOB BLR

The binary language representation (BLR) of the expression of a COMPUTED BY column, used to calculate the value of a computed column when it is accessed.

RDB$COMPUTED_SOURCE

BLOB TEXT

The original source text of the expression that defines a COMPUTED BY column

RDB$DEFAULT_VALUE

BLOB BLR

The binary language representation (BLR) of the default value for the field or domain

RDB$DEFAULT_SOURCE

BLOB TEXT

The default value in the source code, as an SQL constant or expression

RDB$FIELD_LENGTH

SMALLINT

Column size in bytes.BOOLEAN occupies 1 byte.FLOAT, DATE, TIME, INTEGER occupy 4 bytes.DOUBLE PRECISION, BIGINT, TIMESTAMP, TIME WITH TIME ZONE, DECFLOAT(16) and BLOB identifiers occupy 8 bytes.TIMESTAMP WITH TIME ZONE occupies 12 bytes.INT128 and DECFLOAT(34) occupy 16 bytes.For the CHAR and VARCHAR data types, the column stores the maximum number of bytes specified when a string domain (column) is defined

RDB$FIELD_SCALE

SMALLINT

The negative number that specifies the scale for DECIMAL and NUMERIC columns — the number of digits after the decimal point

RDB$FIELD_TYPE

SMALLINT

Data type code for the column:

7 - SMALLINT
8 - INTEGER
10 - FLOAT
12 - DATE
13 - TIME
14 - CHAR
16 - BIGINT
23 - BOOLEAN
24 - DECFLOAT(16)
25 - DECFLOAT(34)
26 - INT128
27 - DOUBLE PRECISION
28 - TIME WITH TIME ZONE
29 - TIMESTAMP WITH TIME ZONE35 - TIMESTAMP
37 - VARCHAR
261 - BLOB

Codes for DECIMAL and NUMERIC are the same as for the integer types used for storage.

RDB$FIELD_SUB_TYPE

SMALLINT

Specifies the subtype for the BLOB data type:

0 - untyped (binary)
1 - text
2 - BLR
3 - access control list
4 - reserved for future use
5 - encoded table metadata description
6 - for storing the details of a cross-database transaction that ends abnormally
7 - external file description
8 - debug information (for PSQL)
< 0 - user-defined

Specifies for the CHAR data type:

0 - untyped data
1 - fixed binary data

Specifies the particular data type for the integer data types (SMALLINT, INTEGER, BIGINT, INT128) and for fixed-point numbers (NUMERIC, DECIMAL):

0 or NULL - the data type matches the value in the RDB$FIELD_TYPE field
1 - NUMERIC
2 - DECIMAL

RDB$MISSING_VALUE

BLOB BLR

Not used

RDB$MISSING_SOURCE

BLOB TEXT

Not used

RDB$DESCRIPTION

BLOB TEXT

Any domain (table column) comment text

RDB$SYSTEM_FLAG

SMALLINT

Flag: the value of 1 means the domain is automatically created by the system, the value of 0 means that the domain is defined by the user

RDB$QUERY_HEADER

BLOB TEXT

Not used

RDB$SEGMENT_LENGTH

SMALLINT

Specifies the length of the BLOB buffer in bytes for BLOB columns.Stores NULL for all other data types

RDB$EDIT_STRING

VARCHAR(127)

Not used

RDB$EXTERNAL_LENGTH

SMALLINT

The length of the column in bytes if it belongs to an external table.Always NULL for regular tables

RDB$EXTERNAL_SCALE

SMALLINT

The scale factor of an integer-type field in an external table;represents the power of 10 by which the integer is multiplied

RDB$EXTERNAL_TYPE

SMALLINT

The data type of the field as it is represented in an external table:

7 - SMALLINT
8 - INTEGER
10 - FLOAT
12 - DATE
13 - TIME
14 - CHAR
16 - BIGINT
23 - BOOLEAN
24 - DECFLOAT(16)
25 - DECFLOAT(34)
26 - INT128
27 - DOUBLE PRECISION
28 - TIME WITH TIME ZONE
29 - TIMESTAMP WITH TIME ZONE35 - TIMESTAMP
37 - VARCHAR
261 - BLOB

RDB$DIMENSIONS

SMALLINT

Defines the number of dimensions in an array if the column is defined as an array.Always NULL for columns that are not arrays

RDB$NULL_FLAG

SMALLINT

Specifies whether the column can take an empty value (the field will contain NULL) or not (the field will contain the value of 1)

RDB$CHARACTER_LENGTH

SMALLINT

The length of CHAR or VARCHAR columns in characters (not in bytes)

RDB$COLLATION_ID

SMALLINT

The identifier of the collation for a character column or domain.If it is not defined, the value of the field will be 0

RDB$CHARACTER_SET_ID

SMALLINT

The identifier of the character set for a character column, BLOB TEXT column or domain

RDB$FIELD_PRECISION

SMALLINT

Specifies the total number of digits for the fixed-point numeric data type (DECIMAL and NUMERIC).The value is 0 for the integer data types, NULL is for other data types

RDB$SECURITY_CLASS

CHAR(63)

May reference a security class defined in the table RDB$SECURITY_CLASSES, to apply access control limits to all users of this domain

RDB$OWNER_NAME

CHAR(63)

The username of the user who created the domain originally

RDB$FIELD_DIMENSIONS

RDB$FIELD_DIMENSIONS stores the dimensions of array columns.

Column Name Data Type Description

RDB$FIELD_NAME

CHAR(63)

The name of the array column.It must be present in the RDB$FIELD_NAME field of the RDB$FIELDS table

RDB$DIMENSION

SMALLINT

Identifies one dimension in the array column.The numbering of dimensions starts with 0

RDB$LOWER_BOUND

INTEGER

The lower bound of this dimension

RDB$UPPER_BOUND

INTEGER

The upper bound of this dimension

RDB$FILES

RDB$FILES stores information about secondary files and shadow files.

Column Name Data Type Description

RDB$FILE_NAME

VARCHAR(255)

The full path to the file and the name of either

  • the database secondary file in a multi-file database, or

  • the shadow file

RDB$FILE_SEQUENCE

SMALLINT

The sequential number of the secondary file in a sequence or of the shadow file in a shadow file set

RDB$FILE_START

INTEGER

The initial page number in the secondary file or shadow file

RDB$FILE_LENGTH

INTEGER

File length in database pages

RDB$FILE_FLAGS

SMALLINT

For internal use

RDB$SHADOW_NUMBER

SMALLINT

Shadow set number.If the row describes a database secondary file, the field will be NULL or its value will be 0

RDB$FILTERS

RDB$FILTERS stores information about BLOB filters.

Column Name Data Type Description

RDB$FUNCTION_NAME

CHAR(63)

The unique identifier of the BLOB filter

RDB$DESCRIPTION

BLOB TEXT

Documentation about the BLOB filter and the two subtypes it is used with, written by the user

RDB$MODULE_NAME

VARCHAR(255)

The name of the dynamic library or shared object where the code of the BLOB filter is located

RDB$ENTRYPOINT

CHAR(255)

The exported name of the BLOB filter in the filter library.Note, this is often not the same as RDB$FUNCTION_NAME, which is the identifier with which the BLOB filter is declared to the database

RDB$INPUT_SUB_TYPE

SMALLINT

The BLOB subtype of the data to be converted by the function

RDB$OUTPUT_SUB_TYPE

SMALLINT

The BLOB subtype of the converted data

RDB$SYSTEM_FLAG

SMALLINT

Flag indicating whether the filter is user-defined or internally defined:

0 - user-defined
1 or greater - internally defined

RDB$SECURITY_CLASS

CHAR(63)

May reference a security class defined in the table RDB$SECURITY_CLASSES, to apply access control limits to all users of this filter

RDB$OWNER_NAME

CHAR(63)

The username of the user who created the filter originally

RDB$FORMATS

RDB$FORMATS stores information about changes in tables.Each time any metadata change to a table is committed, it gets a new format number.When the format number of any table reaches 255, or any view 32,000, the entire database becomes inoperable.To return to normal, the database must be backed up with the gbak utility and restored from that backup copy.

Column Name Data Type Description

RDB$RELATION_ID

SMALLINT

Table or view identifier

RDB$FORMAT

SMALLINT

Table format identifier — maximum 255 for tables, 32,000 for views.The critical time comes when this number approaches 255 for any table or 32,000 for any view

RDB$DESCRIPTOR

BLOB FORMAT

Stores column names and data attributes as BLOB, as they were at the time the format record was created

RDB$FUNCTIONS

RDB$FUNCTIONS stores the information needed by the engine about stored functions and external functions (user-defined functions, UDFs).

Column Name Data Type Description

RDB$FUNCTION_NAME

CHAR(63)

The unique (declared) name of the external function

RDB$FUNCTION_TYPE

SMALLINT

Not currently used

RDB$QUERY_NAME

CHAR(63)

Not currently used

RDB$DESCRIPTION

BLOB TEXT

Any text with comments related to the external function

RDB$MODULE_NAME

VARCHAR(255)

The name of the dynamic library or shared object where the code of the external function is located

RDB$ENTRYPOINT

CHAR(255)

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

RDB$RETURN_ARGUMENT

SMALLINT

The position number of the returned argument in the list of parameters corresponding to input arguments

RDB$SYSTEM_FLAG

SMALLINT

Flag indicating whether the filter is user-defined or internally defined:

0 - user-defined
1 - internally defined

RDB$ENGINE_NAME

CHAR(63)

Engine for external functions.'UDR' for UDR functions.NULL for legacy UDF or PSQL functions

RDB$PACKAGE_NAME

CHAR(63)

Package that contains this function (or NULL)

RDB$PRIVATE_FLAG

SMALLINT

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

RDB$FUNCTION_SOURCE

BLOB TEXT

The PSQL sourcecode of the function

RDB$FUNCTION_ID

SMALLINT

Unique identifier of the function

RDB$FUNCTION_BLR

BLOB BLR

The binary language representation (BLR) of the function code (PSQL function only)

RDB$VALID_BLR

SMALLINT

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

RDB$DEBUG_INFO

BLOB DEBUG_INFORMATION

Contains debugging information about variables used in the function (PSQL function only)

RDB$SECURITY_CLASS

CHAR(63)

May reference a security class defined in the table RDB$SECURITY_CLASSES, to apply access control limits to all users of this function

RDB$OWNER_NAME

CHAR(63)

The username of the user who created the function originally

RDB$LEGACY_FLAG

SMALLINT

The legacy style attribute of the function.1 - if the function is described in legacy style (DECLARE EXTERNAL FUNCTION),otherwise CREATE FUNCTION.

RDB$DETERMINISTIC_FLAG

SMALLINT

Deterministic flag.1 - if function is deterministic

RDB$SQL_SECURITY

BOOLEAN

The SQL SECURITY mode (DEFINER or INVOKER):

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

RDB$FUNCTION_ARGUMENTS

RDB$FUNCTION_ARGUMENTS stores the parameters of functions and their attributes.

Column Name Data Type Description

RDB$FUNCTION_NAME

CHAR(63)

The unique name (declared identifier) of the function

RDB$ARGUMENT_POSITION

SMALLINT

The position of the argument in the list of arguments

RDB$MECHANISM

SMALLINT

Flag: how this argument is passed:

0 - by value
1 - by reference
2 - by descriptor
3 - by BLOB descriptor
4 - by scalar array
5 - by reference with null

Only for legacy external functions.

RDB$FIELD_TYPE

SMALLINT

Data type code defined for the column:

7 - SMALLINT
8 - INTEGER
10 - FLOAT
12 - DATE
13 - TIME
14 - CHAR
16 - BIGINT
23 - BOOLEAN
24 - DECFLOAT(16)
25 - DECFLOAT(34)
26 - INT128
27 - DOUBLE PRECISION
28 - TIME WITH TIME ZONE
29 - TIMESTAMP WITH TIME ZONE
35 - TIMESTAMP
37 - VARCHAR
40 - CSTRING (null-terminated text)
45 - BLOB_ID
261 - BLOB

Only for legacy external functions.

RDB$FIELD_SCALE

SMALLINT

The scale of an integer or a fixed-point argument.It is an exponent of 10.

Only for legacy external functions.

RDB$FIELD_LENGTH

SMALLINT

Argument length in bytes:

BOOLEAN = 1
SMALLINT = 2
INTEGER = 4
DATE = 4
TIME = 4
BIGINT = 8
DECFLOAT(16) = 8
DOUBLE PRECISION = 8
TIMESTAMP = 8
TIME WITH TIME ZONE = 8
BLOB_ID = 8
TIMESTAMP WITH TIME ZONE = 12
INT128 = 16
DECFLOAT(34) = 16

Only for legacy external functions.

RDB$FIELD_SUB_TYPE

SMALLINT

Stores the BLOB subtype for an argument of a BLOB data type.

Only for legacy external functions.

RDB$CHARACTER_SET_ID

SMALLINT

The identifier of the character set for a character argument.

Only for legacy external functions.

RDB$FIELD_PRECISION

SMALLINT

The number of digits of precision available for the data type of the argument.

Only for legacy external functions.

RDB$CHARACTER_LENGTH

SMALLINT

The length of a CHAR or VARCHAR argument in characters (not in bytes).

Only for legacy external functions.

RDB$PACKAGE_NAME

CHAR(63)

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

RDB$ARGUMENT_NAME

CHAR(63)

Parameter name

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$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$ARGUMENT_MECHANISM

SMALLINT

Parameter passing mechanism for non-legacy functions:

0 - by value
1 - by reference
2 - through a descriptor
3 - via the 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$SYSTEM_FLAG

SMALLINT

Flag:

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

RDB$DESCRIPTION

BLOB TEXT

Optional description of the function argument (comment)

RDB$GENERATORS

RDB$GENERATORS stores the metadata of sequences (generators).

Column Name Data Type Description

RDB$GENERATOR_NAME

CHAR(63)

The unique name of the generator

RDB$GENERATOR_ID

SMALLINT

The unique identifier assigned to the generator by the system

RDB$SYSTEM_FLAG

SMALLINT

Flag:

0 - user-defined
1 or greater - system-defined6 - internal generator for identity column

RDB$DESCRIPTION

BLOB TEXT

Could store comments related to the generator

RDB$SECURITY_CLASS

CHAR(63)

May reference a security class defined in the table RDB$SECURITY_CLASSES, to apply access control limits to all users of this generator

RDB$OWNER_NAME

CHAR(63)

The username of the user who created the generator originally

RDB$INITIAL_VALUE

BIGINT

Stores the initial value (START WITH value) of the generator

RDB$GENERATOR_INCREMENT

INTEGER

Stores the increment of the value (INCREMENT BY value) of the generator

RDB$INDEX_SEGMENTS

RDB$INDEX_SEGMENTS stores the segments (table columns) of indexes and their positions in the key.A separate row is stored for each column in an index.

Column Name Data Type Description

RDB$INDEX_NAME

CHAR(63)

The name of the index this segment is related to.The master record is RDB$INDICES.RDB$INDEX_NAME.

RDB$FIELD_NAME

CHAR(63)

The name of a column belonging to the index, corresponding to an identifier for the table and that column in RDB$RELATION_FIELDS.RDB$FIELD_NAME

RDB$FIELD_POSITION

SMALLINT

The column position in the index.Positions are numbered left-to-right, starting at zero

RDB$STATISTICS

DOUBLE PRECISION

The last known (calculated) selectivity of this column in the index.The higher the number, the lower the selectivity.

RDB$BACKUP_HISTORY

RDB$BACKUP_HISTORY stores the history of backups performed using the nBackup utility.

Column Name Data Type Description

RDB$BACKUP_ID

INTEGER

The identifier assigned by the engine

RDB$TIMESTAMP

TIMESTAMP WITH TIME ZONE

Backup date and time

RDB$BACKUP_LEVEL

INTEGER

Backup level

RDB$GUID

CHAR(38)

Unique identifier

RDB$SCN

INTEGER

System (scan) number

RDB$FILE_NAME

VARCHAR(255)

Full path and file name of backup file

RDB$INDICES

RDB$INDICES stores definitions of both system- and user-defined indexes.The attributes of each column belonging to an index are stored in one row of the table RDB$INDEX_SEGMENTS.

Column Name Data Type Description

RDB$INDEX_NAME

CHAR(63)

The unique name of the index specified by the user or automatically generated by the system

RDB$RELATION_NAME

CHAR(63)

The name of the table to which the index belongs.It corresponds to an identifier in RDB$RELATION_NAME.RDB$RELATIONS

RDB$INDEX_ID

SMALLINT

The internal (system) identifier of the index

RDB$UNIQUE_FLAG

SMALLINT

Specifies whether the index is unique:

0 - not unique
1 - unique

RDB$DESCRIPTION

BLOB TEXT

Could store comments concerning the index

RDB$SEGMENT_COUNT

SMALLINT

The number of segments (columns) in the index

RDB$INDEX_INACTIVE

SMALLINT

Indicates whether the index is currently active:

0 - active
1 - inactive

RDB$INDEX_TYPE

SMALLINT

Distinguishes between an ascending (0 or NULL) and descending index (1).Not used in databases created before Firebird 2.0;hence, indexes in upgraded databases are more likely to store NULL in this column

RDB$FOREIGN_KEY

CHAR(63)

The name of the primary or unique key index referenced by the foreign key backed by this index;NULL if this index is not used by a foreign key.

RDB$SYSTEM_FLAG

SMALLINT

Indicates whether the index is system-defined or user-defined:

0 - user-defined
1 or greater - system-defined

RDB$EXPRESSION_BLR

BLOB BLR

The binary language representation (BLR) of the expression of an expression index, used for calculating the values for the index at runtime.

RDB$EXPRESSION_SOURCE

BLOB TEXT

The source code of the expression of an expression index

RDB$STATISTICS

DOUBLE PRECISION

Stores the last known selectivity of the entire index, calculated by execution of a SET STATISTICS statement over the index.It is also recalculated whenever the database is first opened by the server.The selectivity of each separate segment of the index is stored in RDB$INDEX_SEGMENTS.

RDB$CONDITION_BLR

BLOB BLR

The binary language representation (BLR) of the WHERE condition of a partial index, used for filtering the values for the index at runtime, and optimizer decisions to use the index.

RDB$CONDITION_SOURCE

BLOB TEXT

The source code of the WHERE condition of a partial index

RDB$KEYWORDS

RDB$KEYWORDS is a virtual table listing the keywords used by the Firebird SQL parser.If a keyword is reserved, it cannot be used as a regular identifier, but only as a delimited (quoted) identifier.

Column Name Data Type Description

RDB$KEYWORD_NAME

VARCHAR(63)

Keyword

RDB$KEYWORD_RESERVED

BOOLEAN

true if this a reserved word, false otherwise

RDB$LOG_FILES

RDB$LOG_FILES is not currently used.

RDB$PACKAGES

RDB$PACKAGES stores the definition (header and body) of SQL packages.

Column Name Data Type Description

RDB$PACKAGE_NAME

CHAR(63)

Name of the package

RDB$PACKAGE_HEADER_SOURCE

BLOB TEXT

The PSQL sourcecode of the package header

RDB$PACKAGE_BODY_SOURCE

BLOB TEXT

The PSQL sourcecode of the package body

RDB$VALID_BODY_FLAG

SMALLINT

Indicates whether the body of the package is still valid.NULL or 0 indicates the body is not valid.

RDB$SECURITY_CLASS

CHAR(63)

May reference a security class defined in the table RDB$SECURITY_CLASSES, to apply access control limits to all users of this package

RDB$OWNER_NAME

CHAR(63)

The username of the user who created the package originally

RDB$SYSTEM_FLAG

SMALLINT

Flag:

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

RDB$DESCRIPTION

BLOB TEXT

Optional description of the package (comment)

RDB$SQL_SECURITY

BOOLEAN

The SQL SECURITY mode (DEFINER or INVOKER):

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

RDB$PAGES

RDB$PAGES stores and maintains information about database pages and their usage.

Column Name Data Type Description

RDB$PAGE_NUMBER

INTEGER

The unique number of a physically created database page

RDB$RELATION_ID

SMALLINT

The identifier of the table to which the page is allocated

RDB$PAGE_SEQUENCE

INTEGER

The number of the page in the sequence of all pages allocated to this table

RDB$PAGE_TYPE

SMALLINT

Indicates the page type (data, index, BLOB, etc.).For system use

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

RDB$REF_CONSTRAINTS

RDB$REF_CONSTRAINTS stores the attributes of the referential constraints — Foreign Key relationships and referential actions.

Column Name Data Type Description

RDB$CONSTRAINT_NAME

CHAR(63)

Foreign key constraint name, defined by the user or automatically generated by the system

RDB$CONST_NAME_UQ

CHAR(63)

The name of the primary or unique key constraint linked by the REFERENCES clause in the constraint definition

RDB$MATCH_OPTION

CHAR(7)

Not used.The current value is FULL in all cases

RDB$UPDATE_RULE

CHAR(11)

Referential integrity actions applied to the foreign key record(s) when the primary (unique) key of the parent table is updated: RESTRICT, NO ACTION, CASCADE, SET NULL, SET DEFAULT

RDB$DELETE_RULE

CHAR(11)

Referential integrity actions applied to the foreign key record(s) when the primary (unique) key of the parent table is deleted: RESTRICT, NO ACTION, CASCADE, SET NULL, SET DEFAULT

RDB$CHARACTER_SETS

RDB$CHARACTER_SETS names and describes the character sets available in the database.

Column Name Data Type Description

RDB$CHARACTER_SET_NAME

CHAR(63)

Character set name

RDB$FORM_OF_USE

CHAR(63)

Not used

RDB$NUMBER_OF_CHARACTERS

INTEGER

The number of characters in the set.Not used for existing character sets

RDB$DEFAULT_COLLATE_NAME

CHAR(63)

The name of the default collation for the character set

RDB$CHARACTER_SET_ID

SMALLINT

Unique character set identifier

RDB$SYSTEM_FLAG

SMALLINT

System flag: value is 1 if the character set is defined in the system when the database is created;value is 0 for a user-defined character set

RDB$DESCRIPTION

BLOB TEXT

Could store text description of the character set

RDB$FUNCTION_NAME

CHAR(63)

For a user-defined character set that is accessed via an external function, the name of the external function

RDB$BYTES_PER_CHARACTER

SMALLINT

The maximum number of bytes representing one character

RDB$SECURITY_CLASS

CHAR(63)

May reference a security class defined in the table RDB$SECURITY_CLASSES, to apply access control limits to all users of this character set

RDB$OWNER_NAME

CHAR(63)

The username of the user who created the character set originally

RDB$RELATIONS

RDB$RELATIONS stores the top-level definitions and attributes of all tables and views in the system.

Column Name Data Type Description

RDB$VIEW_BLR

BLOB BLR

The binary language representation (BLR) of the query specification of a view.The field stores NULL for a table

RDB$VIEW_SOURCE

BLOB TEXT

Contains the original source text of the query for a view, in SQL language.User comments are included.The field stores NULL for a table

RDB$DESCRIPTION

BLOB TEXT

Could store comments related to the table or view

RDB$RELATION_ID

SMALLINT

Internal identifier of the table or view

RDB$SYSTEM_FLAG

SMALLINT

indicates whether the table or view is user-defined (value 0) or system-defined (value 1 or greater)

RDB$DBKEY_LENGTH

SMALLINT

The total length of the database key.For a table: 8 bytes.For a view, the length is 8 multiplied by the number of tables referenced by the view

RDB$FORMAT

SMALLINT

Internal use, points to the relation’s record in RDB$FORMATS — do not modify

RDB$FIELD_ID

SMALLINT

The field ID for the next column to be added.The number is not decremented when a column is dropped.

RDB$RELATION_NAME

CHAR(63)

Table or view name

RDB$SECURITY_CLASS

CHAR(63)

May reference a security class defined in the table RDB$SECURITY_CLASSES, to apply access control limits to all users of this table or view

RDB$EXTERNAL_FILE

VARCHAR(255)

The full path to the external data file if the table is defined with the EXTERNAL FILE clause

RDB$RUNTIME

BLOB

Table metadata description, used internally for optimization

RDB$EXTERNAL_DESCRIPTION

BLOB

Could store comments related to the external file of an external table

RDB$OWNER_NAME

CHAR(63)

The username of the user who created the table or view originally

RDB$DEFAULT_CLASS

CHAR(63)

Default security class, used when a new column is added to the table

RDB$FLAGS

SMALLINT

Internal flags

RDB$RELATION_TYPE

SMALLINT

The type of the relation object being described:

0 - system or user-defined table
1 - view
2 - external table
3 - monitoring table
4 - connection-level GTT (PRESERVE ROWS)
5 - transaction-level GTT (DELETE ROWS)

RDB$SQL_SECURITY

BOOLEAN

The SQL SECURITY mode (DEFINER or INVOKER):

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

RDB$RELATION_CONSTRAINTS

RDB$RELATION_CONSTRAINTS stores the definitions of all table-level constraints: primary, unique, foreign key, CHECK, NOT NULL constraints.

Column Name Data Type Description

RDB$CONSTRAINT_NAME

CHAR(63)

The name of the table-level constraint defined by the user, or otherwise automatically generated by the system

RDB$CONSTRAINT_TYPE

CHAR(11)

The name of the constraint type: PRIMARY KEY, UNIQUE, FOREIGN KEY, CHECK or NOT NULL

RDB$RELATION_NAME

CHAR(63)

The name of the table this constraint applies to

RDB$DEFERRABLE

CHAR(3)

Currently NO in all cases: Firebird does not yet support deferrable constraints

RDB$INITIALLY_DEFERRED

CHAR(3)

Currently NO in all cases

RDB$INDEX_NAME

CHAR(63)

The name of the index that supports this constraint.For a CHECK or a NOT NULL constraint, it is NULL.

RDB$RELATION_FIELDS

RDB$RELATION_FIELDS stores the definitions of table and view columns.

Column Name Data Type Description

RDB$FIELD_NAME

CHAR(63)

Column name

RDB$RELATION_NAME

CHAR(63)

The name of the table or view that the column belongs to

RDB$FIELD_SOURCE

CHAR(63)

Domain name on which the column is based, either a user-defined one specified in the table definition or one created automatically by the system using the set of attributes defined.The attributes are in the table RDB$FIELDS: this column matches RDB$FIELDS.RDB$FIELD_NAME.

RDB$QUERY_NAME

CHAR(63)

Not currently used

RDB$BASE_FIELD

CHAR(63)

Only populated for a view, it is the name of the column from the base table

RDB$EDIT_STRING

VARCHAR(127)

Not used

RDB$FIELD_POSITION

SMALLINT

The zero-based ordinal position of the column in the table or view, numbering from left to right

RDB$QUERY_HEADER

BLOB TEXT

Not used

RDB$UPDATE_FLAG

SMALLINT

Indicates whether the column is a regular one (value 1) or a computed one (value 0)

RDB$FIELD_ID

SMALLINT

An ID assigned from RDB$RELATIONS.RDB$FIELD_ID at the time the column was added to the table or view.It should always be treated as transient

RDB$VIEW_CONTEXT

SMALLINT

For a view column, the internal identifier of the base table from which this field derives

RDB$DESCRIPTION

BLOB TEXT

Comments related to the table or view column

RDB$DEFAULT_VALUE

BLOB BLR

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

RDB$SYSTEM_FLAG

SMALLINT

Indicates whether the column is user-defined (value 0) or system-defined (value 1 or greater)

RDB$SECURITY_CLASS

CHAR(63)

May reference a security class defined in RDB$SECURITY_CLASSES, to apply access control limits to all users of this column

RDB$COMPLEX_NAME

CHAR(63)

Not used

RDB$NULL_FLAG

SMALLINT

Indicates whether the column is nullable (NULL) non-nullable (value 1)

RDB$DEFAULT_SOURCE

BLOB TEXT

The source text of the DEFAULT clause, if any

RDB$COLLATION_ID

SMALLINT

The identifier of the collation in the character set for the column, if it is not the default collation

RDB$GENERATOR_NAME

CHAR(63)

Internal generator name for generating an identity value for the column.

RDB$IDENTITY_TYPE

SMALLINT

The identity type of the column

NULL - not an identity column
0 - identity column, GENERATED ALWAYS
1 - identity column, GENERATED BY DEFAULT

RDB$ROLES

RDB$ROLES stores the roles that have been defined in this database.

Column Name Data Type Description

RDB$ROLE_NAME

CHAR(63)

Role name

RDB$OWNER_NAME

CHAR(63)

The username of the role owner

RDB$DESCRIPTION

BLOB TEXT

Could store comments related to the role

RDB$SYSTEM_FLAG

SMALLINT

System flag

RDB$SECURITY_CLASS

CHAR(63)

May reference a security class defined in the table RDB$SECURITY_CLASSES, to apply access control limits to all users of this role

RDB$SYSTEM_PRIVILEGES

BINARY(8)

Bitset with the system privileges granted to a role, with the following bits

0 - unused
1 - USER_MANAGEMENT
2 - READ_RAW_PAGES
3 - CREATE_USER_TYPES
4 - USE_NBACKUP_UTILITY
5 - CHANGE_SHUTDOWN_MODE
6 - TRACE_ANY_ATTACHMENT
7 - MONITOR_ANY_ATTACHMENT
8 - ACCESS_SHUTDOWN_DATABASE
9 - CREATE_DATABASE
10 - DROP_DATABASE
11 - USE_GBAK_UTILITY
12 - USE_GSTAT_UTILITY
13 - USE_GFIX_UTILITY
14 - IGNORE_DB_TRIGGERS
15 - CHANGE_HEADER_SETTINGS
16 - SELECT_ANY_OBJECT_IN_DATABASE
17 - ACCESS_ANY_OBJECT_IN_DATABASE
18 - MODIFY_ANY_OBJECT_IN_DATABASE
19 - CHANGE_MAPPING_RULES
20 - USE_GRANTED_BY_CLAUSE
21 - GRANT_REVOKE_ON_ANY_OBJECT
22 - GRANT_REVOKE_ANY_DDL_RIGHT
23 - CREATE_PRIVILEGED_ROLES
24 - GET_DBCRYPT_INFO
25 - MODIFY_EXT_CONN_POOL
26 - REPLICATE_INTO_DATABASE
27 - PROFILE_ANY_ATTACHMENT

RDB$SECURITY_CLASSES

RDB$SECURITY_CLASSES stores the access control lists

Column Name Data Type Description

RDB$SECURITY_CLASS

CHAR(63)

Security class name

RDB$ACL

BLOB ACL

The access control list related to the security class.It enumerates users and their privileges

RDB$DESCRIPTION

BLOB TEXT

Could store comments related to the security class

RDB$TIME_ZONES

RDB$TIME_ZONES lists the named time zones supported by the engine.It is a virtual table that is populated using the current time zone database of the Firebird engine.

Column Name Data Type Description

RDB$TIME_ZONE_ID

INTEGER

The unique identifier of the time zone as used by Firebird.For example, this identifier is used in the time_zone field of the ISC_TIMESTAMP_TZ struct if the value has a named zone instead of an offset.

RDB$TIME_ZONE_NAME

CHAR(63)

Name of the time zone as specified by the time zone database

RDB$TRANSACTIONS

RDB$TRANSACTIONS stores the states of distributed transactions and other transactions that were prepared for two-phase commit with an explicit prepare message.

Column Name Data Type Description

RDB$TRANSACTION_ID

INTEGER

The unique identifier of the transaction being tracked

RDB$TRANSACTION_STATE

SMALLINT

Transaction state:

0 - in limbo
1 - committed
2 - rolled back

RDB$TIMESTAMP

TIMESTAMP WITH TIME ZONE

Not used

RDB$TRANSACTION_DESCRIPTION

BLOB

Describes the prepared transaction and could be a custom message supplied to isc_prepare_transaction2, even if it is not a distributed transaction.It may be used when a lost connection cannot be restored

RDB$TRIGGERS

RDB$TRIGGERS stores the trigger definitions for all tables and views.

Column Name Data Type Description

RDB$TRIGGER_NAME

CHAR(63)

Trigger name

RDB$RELATION_NAME

CHAR(63)

The name of the table or view the trigger applies to.NULL if the trigger is applicable to a database event (“database trigger”)

RDB$TRIGGER_SEQUENCE

SMALLINT

Position of this trigger in the sequence.Zero usually means that no sequence position is specified

RDB$TRIGGER_TYPE

BIGINT

The event the trigger fires on, see [fblangref-appx04-triggers-type]

RDB$TRIGGER_SOURCE

BLOB TEXT

Stores the source code of the trigger in PSQL

RDB$TRIGGER_BLR

BLOB BLR

The binary language representation (BLR) of the trigger code (PSQL trigger only)

RDB$DESCRIPTION

BLOB TEXT

Trigger comment text

RDB$TRIGGER_INACTIVE

SMALLINT

Indicates whether the trigger is currently inactive (1) or active (0)

RDB$SYSTEM_FLAG

SMALLINT

Flag: indicates whether the trigger is user-defined (value 0) or system-defined (value 1 or greater)

RDB$FLAGS

SMALLINT

Internal use

RDB$VALID_BLR

SMALLINT

Indicates whether the text of the trigger remains valid after the latest modification by the ALTER TRIGGER statement

RDB$DEBUG_INFO

BLOB

Contains debugging information about variables used in the trigger

RDB$ENGINE_NAME

CHAR(63)

Engine for external triggers.'UDR' for UDR triggers.NULL for PSQL triggers

RDB$ENTRYPOINT

CHAR(255)

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

RDB$SQL_SECURITY

BOOLEAN

The SQL SECURITY mode (DEFINER or INVOKER):

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

RDB$TRIGGER_TYPE Value

The value of RDB$TRIGGER_TYPE is built from:

1

before insert

2

after insert

3

before update

4

after update

5

before delete

6

after delete

17

before insert or update

18

after insert or update

25

before insert or delete

26

after insert or delete

27

before update or delete

28

after update or delete

113

before insert or update or delete

114

after insert or update or delete

8192

on connect

8193

on disconnect

8194

on transaction start

8195

on transaction commit

8196

on transaction rollback

Note

Identification of the exact RDB$TRIGGER_TYPE code is a little more complicated, since it is a bitmap, calculated according to which phase and events are covered and the order in which they are defined.For the curious, the calculation is explained in this code comment by Mark Rotteveel.

For DDL triggers, the trigger type is obtained by bitwise OR above the event phase (0 — BEFORE, 1 — AFTER) and all listed types events:

0x0000000000004002

CREATE TABLE

0x0000000000004004

ALTER TABLE

0x0000000000004008

DROP TABLE

0x0000000000004010

CREATE PROCEDURE

0x0000000000004020

ALTER PROCEDURE

0x0000000000004040

DROP PROCEDURE

0x0000000000004080

CREATE FUNCTION

0x0000000000004100

ALTER FUNCTION

0x0000000000004200

DROP FUNCTION

0x0000000000004400

CREATE TRIGGER

0x0000000000004800

ALTER TRIGGER

0x0000000000005000

DROP TRIGGER

0x0000000000014000

CREATE EXCEPTION

0x0000000000024000

ALTER EXCEPTION

0x0000000000044000

DROP EXCEPTION

0x0000000000084000

CREATE VIEW

0x0000000000104000

ALTER VIEW

0x0000000000204000

DROP VIEW

0x0000000000404000

CREATE DOMAIN

0x0000000000804000

ALTER DOMAIN

0x0000000001004000

DROP DOMAIN

0x0000000002004000

CREATE ROLE

0x0000000004004000

ALTER ROLE

0x0000000008004000

DROP ROLE

0x0000000010004000

CREATE INDEX

0x0000000020004000

ALTER INDEX

0x0000000040004000

DROP INDEX

0x0000000080004000

CREATE SEQUENCE

0x0000000100004000

ALTER SEQUENCE

0x0000000200004000

DROP SEQUENCE

0x0000000400004000

CREATE USER

0x0000000800004000

ALTER USER

0x0000001000004000

DROP USER

0x0000002000004000

CREATE COLLATION

0x0000004000004000

DROP COLLATION

0x0000008000004000

ALTER CHARACTER SET

0x0000010000004000

CREATE PACKAGE

0x0000020000004000

ALTER PACKAGE

0x0000040000004000

DROP PACKAGE

0x0000080000004000

CREATE PACKAGE BODY

0x0000100000004000

DROP PACKAGE BODY

0x0000200000004000

CREATE MAPPING

0x0000400000004000

ALTER MAPPING

0x0000800000004000

DROP MAPPING

0x7FFFFFFFFFFFDFFE

ANY DDL STATEMENT

For example a trigger with
BEFORE CREATE PROCEDURE OR CREATE FUNCTION will be of type 0x0000000000004090,
AFTER CREATE PROCEDURE OR CREATE FUNCTION — 0x0000000000004091,
BEFORE DROP FUNCTION OR DROP EXCEPTION — 0x00000000000044200,
AFTER DROP FUNCTION OR DROP EXCEPTION — 0x00000000000044201,
BEFORE DROP TRIGGER OR DROP DOMAIN — 0x00000000001005000,
AFTER DROP TRIGGER OR DROP DOMAIN — 0x00000000001005001.

RDB$TRIGGER_MESSAGES

RDB$TRIGGER_MESSAGES stores the trigger messages.

Column Name Data Type Description

RDB$TRIGGER_NAME

CHAR(63)

The name of the trigger the message is associated with

RDB$MESSAGE_NUMBER

SMALLINT

The number of the message within this trigger (from 1 to 32,767)

RDB$MESSAGE

VARCHAR(1023)

Text of the trigger message

RDB$TYPES

RDB$TYPES stores the defining sets of enumerated types used throughout the system.

Column Name Data Type Description

RDB$FIELD_NAME

CHAR(63)

Enumerated type name.Each type name masters its own set of types, e.g., object types, data types, character sets, trigger types, blob subtypes, etc.

RDB$TYPE

SMALLINT

The object type identifier.A unique series of numbers is used within each separate enumerated type.For example, for the RDB$OBJECT_TYPE enumerated type, examples of object types are:

0 - TABLE
1 - VIEW
2 - TRIGGER
 …​

RDB$TYPE_NAME

CHAR(63)

The name of a member of an enumerated type, e.g., TABLE, VIEW, TRIGGER, etc. in the example above.In the RDB$CHARACTER_SET enumerated type, RDB$TYPE_NAME stores the names of the character sets.

RDB$DESCRIPTION

BLOB TEXT

Any text comments related to the enumerated type

RDB$SYSTEM_FLAG

SMALLINT

Flag: indicates whether the type-member is user-defined (value 0) or system-defined (value 1 or greater)

RDB$CHECK_CONSTRAINTS

RDB$CHECK_CONSTRAINTS provides the cross references between the names of system-generated triggers for constraints and the names of the associated constraints (NOT NULL constraints, CHECK constraints and the ON UPDATE and ON DELETE clauses in foreign key constraints).

Column Name Data Type Description

RDB$CONSTRAINT_NAME

CHAR(63)

Constraint name, defined by the user or automatically generated by the system

RDB$TRIGGER_NAME

CHAR(63)

For a CHECK constraint, it is the name of the trigger that enforces this constraint.For a NOT NULL constraint, it is the name of the table the constraint is applied to.For a foreign key constraint, it is the name of the trigger that enforces the ON UPDATE, ON DELETE clauses.

RDB$USER_PRIVILEGES

RDB$USER_PRIVILEGES stores the SQL access privileges for Firebird users and privileged objects.

Column Name Data Type Description

RDB$USER

CHAR(63)

The user or object that is granted this privilege

RDB$GRANTOR

CHAR(63)

The user who grants the privilege

RDB$PRIVILEGE

CHAR(6)

The privilege granted hereby:

A - all (all privileges)
S - select (selecting data)
I - insert (inserting rows)
D - delete (deleting rows)
R - references (foreign key)
U - update (updating data)
X - executing (procedure)
G - usage (of other object types)
M - role membership
C - DDL privilege create
L - DDL privilege alter
O - DDL privilege drop

RDB$GRANT_OPTION

SMALLINT

Whether the WITH GRANT OPTION authority is included with the privilege:

0 - not included
1 - included

RDB$RELATION_NAME

CHAR(63)

The name of the object (table, view, procedure or role) the privilege is granted ON

RDB$FIELD_NAME

CHAR(63)

The name of the column the privilege is applicable to, for a column-level privilege (an UPDATE or REFERENCES privilege)

RDB$USER_TYPE

SMALLINT

Identifies the type of user the privilege is granted TO (a user, a procedure, a view, etc.)

RDB$OBJECT_TYPE

SMALLINT

Identifies the type of the object the privilege is granted ON

0 - table
1 - view
2 - trigger
5 - procedure
7 - exception
8 - user
9 - domain
11 - character set
13 - role
14 - generator (sequence)
15 - function
16 - BLOB filter
17 - collation
18 - package

RDB$VIEW_RELATIONS

RDB$VIEW_RELATIONS stores the tables that are referred to in view definitions.There is one record for each table in a view.

Column Name Data Type Description

RDB$VIEW_NAME

CHAR(63)

View name

RDB$RELATION_NAME

CHAR(63)

The name of the table, view or stored procedure the view references

RDB$VIEW_CONTEXT

SMALLINT

The alias used to reference the view column in the BLR code of the query definition

RDB$CONTEXT_NAME

CHAR(255)

The text associated with the alias reported in the RDB$VIEW_CONTEXT column

RDB$CONTEXT_TYPE

SMALLINT

Context type:

0 - table
1 - view
2 - stored procedure

RDB$PACKAGE_NAME

CHAR(63)

Package name for a stored procedure in a package

RDB$COLLATIONS

RDB$COLLATIONS stores collations for all character sets.

Column Name Data Type Description

RDB$COLLATION_NAME

CHAR(63)

Collation name

RDB$COLLATION_ID

SMALLINT

Collation identifier.Together with the character set identifier, it is a unique collation identifier

RDB$CHARACTER_SET_ID

SMALLINT

Character set identifier.Together with the collection sequence identifier, it is a unique identifier

RDB$COLLATION_ATTRIBUTES

SMALLINT

Collation attributes.It is a bit mask where the first bit shows whether trailing spaces should be taken into account in collations (0 - NO PAD; 1 - PAD SPACE);the second bit shows whether the collation is case-sensitive (0 - CASE SENSITIVE, 1 - CASE INSENSITIVE);the third bit shows whether the collation is accent-sensitive (0 - ACCENT SENSITIVE, 1 - ACCENT SENSITIVE).Thus, the value of 5 means that the collation does not take into account trailing spaces and is accent-insensitive

RDB$SYSTEM_FLAG

SMALLINT

Flag: the value of 0 means it is user-defined;the value of 1 means it is system-defined

RDB$DESCRIPTION

BLOB TEXT

Could store text description of the collation

RDB$FUNCTION_NAME

CHAR(63)

Not currently used

RDB$BASE_COLLATION_NAME

CHAR(63)

The name of the base collation for this collation

RDB$SPECIFIC_ATTRIBUTES

BLOB TEXT

Describes specific attributes

RDB$SECURITY_CLASS

CHAR(63)

May reference a security class defined in the table RDB$SECURITY_CLASSES, to apply access control limits to all users of this collation

RDB$OWNER_NAME

CHAR(63)

The username of the user who created the collation originally

RDB$CONFIG

RDB$CONFIG is a virtual table showing the configuration settings of the current database for the current connection.

Table RDB$CONFIG is populated from in-memory structures upon request and its instance is preserved for the SQL query lifetime.For security reasons, access to this table is allowed for administrators only.Non-privileged users see no rows in this table (and no error is raised).

Column Name Data Type Description

RDB$CONFIG_ID

INTEGER

Unique row identifier, no special meaning

RDB$CONFIG_NAME

VARCHAR(63)

Setting name (e.g. TempCacheLimit)

RDB$CONFIG_VALUE

VARCHAR(255)

Actual value of setting

RDB$CONFIG_DEFAULT

VARCHAR(255)

Default value of setting (defined in the Firebird code)

RDB$CONFIG_IS_SET

BOOLEAN

TRUE if value is explicitly configured, FALSE when default

RDB$CONFIG_SOURCE

VARCHAR(255)

Name of the configuration file (relative to the Firebird root directory) where this setting was taken from, or special value DPB if the setting was specified by the client application via API.

RDB$DATABASE

RDB$DATABASE stores basic information about the database.It contains only one record.

Column Name Data Type Description

RDB$DESCRIPTION

BLOB TEXT

Database comment text

RDB$RELATION_ID

SMALLINT

A number that steps up by one each time a table or view is added to the database

RDB$SECURITY_CLASS

CHAR(63)

The security class defined in RDB$SECURITY_CLASSES to apply access control limits common to the entire database

RDB$CHARACTER_SET_NAME

CHAR(63)

The name of the default character set for the database set in the DEFAULT CHARACTER SET clause when the database is created.NULL for character set NONE.

RDB$LINGER

INTEGER

Number of seconds "delay" (established with the ALTER DATABASE SET LINGER statement) until the database file is closed after the last connection to this database is closed (in SuperServer).NULL if no delay is set.

RDB$SQL_SECURITY

BOOLEAN

The default SQL SECURITY mode (DEFINER or INVOKER) applied to newly created objects:

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

RDB$DB_CREATORS

RDB$DB_CREATORS contains a list of users granted the CREATE DATABASE privilege when using the specified database as a security database.

Column Name Data Type Description

RDB$USER

CHAR(63)

User or role name

RDB$USER_TYPE

SMALLINT

Type of user

8 - user
13 - role

RDB$DEPENDENCIES

RDB$DEPENDENCIES stores the dependencies between database objects.

Column Name Data Type Description

RDB$DEPENDENT_NAME

CHAR(63)

The name of the view, procedure, trigger, CHECK constraint or computed column the dependency is defined for, i.e., the dependent object

RDB$DEPENDED_ON_NAME

CHAR(63)

The name of the object that the defined object — the table, view, procedure, trigger, CHECK constraint or computed column — depends on

RDB$FIELD_NAME

CHAR(63)

The column name in the depended-on object that is referred to by the dependent view, procedure, trigger, CHECK constraint or computed column

RDB$DEPENDENT_TYPE

SMALLINT

Identifies the type of the dependent object:

0 - table
1 - view
2 - trigger
3 - computed column
4 - CHECK constraint
5 - procedure
6 - index expression
7 - exception
8 - user
9 - column
10 - index
15 - stored function
18 - package header
19 - package body

RDB$DEPENDED_ON_TYPE

SMALLINT

Identifies the type of the object depended on:

0 - table (or a column in it)
1 - view
2 - trigger
3 - computed column
4 - CHECK constraint
5 - procedure (or its parameter(s))
6 - index expression
7 - exception
8 - user
9 - column
10 - index
14 - generator (sequence)
15 - UDF or stored function
17 - collation18 - package header
19 - package body

RDB$PACKAGE_NAME

CHAR(63)

The package of a procedure or function for which this describes the dependency.