RDB$RELATION FIELDS

From InterBase

Go Up to System Tables


For database tables, RDB$RELATION_FIELDS lists columns and describes column characteristics for domains.

SQL columns are defined in RDB$RELATION_FIELDS. The column name is correlated in the RDB$FIELD_SOURCE column to an underlying entry in RDB$FIELDS that contains a system name (“SQL$<n>”). This entry includes information such as column type and length. For both domains and simple columns, this table may contain default and nullability information.

Column name Data Type Length Description

RDB$FIELD_NAME

CHAR

67

Column name defined by the user.

RDB$RELATION_NAME

CHAR

67

Table name defined by the user.

RDB$FIELD_SOURCE

CHAR

67

Internal Column name that matches up with RDB$FIELDS.RDB$FIELD_NAME.

RDB$QUERY_NAME

CHAR

67

Alternate column name for use in isql; supersedes the value in RDB$FIELDS.

RDB$BASE_FIELD

CHAR

67

Views only: The name of the column from RDB$FIELDS in a table or view that is the base for a view column being defined; for the base column:

  • RDB$BASE_FIELD provides the column name.
  • RDB$VIEW_CONTEXT, a column in this table, provides the source table name.

RDB$EDIT_STRING

VARCHAR

125

Not used in SQL.

RDB$FIELD_POSITION

SMALLINT

The position of the column in relation to other columns:

  • isql obtains the ordinal position for displaying column values when printing rows from this column.
  • gpre uses the column order for SELECT and INSERT statements.

If two or more columns in the same table have the same value for this column, those columns appear in random order.

RDB$QUERY_HEADER

BLOB

Not used in SQL.

RDB$UPDATE_FLAG

SMALLINT

Not used by {{Product; included for compatibility with other DSRI-based systems.

RDB$FIELD_ID

SMALLINT

Identifier for use in BLR (Binary Language Representation) to name the column.

  • Because this identifier changes during backup and restoration of the database, try to use it in transient requests only.
  • Do not modify this column.

RDB$VIEW_CONTEXT

SMALLINT

Alias used to qualify view columns by specifying the table location of the base column; it must have the same value as the alias used in the view BLR (Binary Language Representation) for this context stream.

RDB$DESCRIPTION

BLOB

Subtype Text: User-written description of the column being defined.

RDB$DEFAULT_VALUE

BLOB

Subtype BLR: BLR (Binary Language Representation) for default clause.

RDB$SYSTEM_FLAG

SMALLINT

Indicates whether the column is:

  • User-defined (value of 0)
  • System-defined (value greater than 0)

RDB$SECURITY_CLASS

CHAR

67

Names a security class defined in the RDB$SECURITY_CLASSES table; the access restrictions defined by this security class apply to all users of this column.

RDB$COMPLEX_NAME

CHAR

67

Reserved for future use.

RDB$NULL_FLAG

SMALLINT

Indicates whether the column may contain NULL values.

RDB$DEFAULT_SOURCE

BLOB

Subtype Text: SQL source to define defaults.

RDB$COLLATION_ID

SMALLINT

Unique identifier for the collation sequence.

RDB$ENCRYPTION_ID

SMALLINT

Identifies encryption ID from RDB$ENCRYPTIONS used to encrypt this column.

RDB$DECRYPT_DEFAULT_VALUE

BLOB

Subtype BLR: BLR (Binary Language Representation) for decrypt default clause.

RDB$DECRYPT_DEFAULT_SOURCE

BLOB

Subtype Text: SQL to define decrypt default.

RDB$FLAGS

SMALLINT

2

1 = One or more subscriptions on the field