SYSPROCBODY
The sysprocbody system catalog table describes
the compiled version of each procedure or function in the database.
Because the sysprocbody table stores the text of the routine,
each routine can have multiple rows. The sysprocbody table
has the following columns.
Column | Type | Explanation |
---|---|---|
procid | INTEGER | Unique identifying code for the routine |
datakey | CHAR(1) | Type of information in the data column:
|
seqno | INTEGER | Line number within the routine |
data | CHAR(256) | Actual text of the routine |
The A flag indicates the procedure modifiers are altered. ALTER ROUTINE statement updates only modifiers and not the routine body. UPDATE STATISTICS updates the query plan and not the routine modifiers, and the value of datakey will not be changed from A. The A flag marks all the procedures and functions that have altered modifiers, including overloaded procedures and functions. The T flag is used for routine creation text.
The data column contains actual data, which can
be in one of these formats:
- Encoded return values list
- Encoded symbol table
- Literal data
- P-code for the routine
- Compiled code for the routine
- Text of the routine and its documentation
A composite index on the procid, datakey, and seqno columns allows only unique values.