informix
Informix Guide to SQL: Reference
System Catalog

Structure of the System Catalog

The following system catalog tables describe the structure of an Informix database.

System Catalog Table EDS IDS Page
sysaggregates 1-16
sysams 1-17
sysattrtypes 1-23
sysblobs 1-24
syscasts 1-25
syschecks 1-26
syscolattribs 1-27
syscolauth 1-28
syscoldepend 1-29
syscolumns 1-30
sysconstraints 1-36
sysdefaults 1-37
sysdepend 1-38
sysdistrib 1-39
syserrors 1-41
sysextcols 1-42
sysextdfiles 1-43
sysexternal 1-44
sysfragauth 1-45
sysfragments 1-46
sysindexes 1-49
sysindices 1-51
sysinherits 1-53
syslangauth 1-53
syslogmap 1-54
sysnewdepend 1-54
sysobjstate 1-55
sysopclasses 1-56
sysopclstr 1-57
sysprocauth 1-59
sysprocbody 1-60
sysprocedures 1-61
sysprocplan 1-65
sysreferences 1-66
sysrepository 1-67
sysroleauth 1-68
sysroutinelangs 1-68
syssynonyms 1-69
syssyntable 1-70
systabamdata 1-71
systabauth 1-72
systables 1-73
systraceclasses 1-75
systracemsgs 1-76
systrigbody 1-77
systriggers 1-78
sysusers 1-79
sysviews 1-80
sysviolations 1-81
sysxtddesc 1-82
systdtypeauth 1-83
sysxtdtypes 1-84

In a database whose collation order is locale dependent, all character information in the system catalog tables is stored in NCHAR rather than CHAR columns. However, for those databases where the collation order is code-set dependent, all character information in the system catalog tables is stored in CHAR columns. For more information on collation orders and NCHAR and NVARCHAR data types, see the Informix Guide to GLS Functionality. For information about data types, see Chapter 2 of this manual.

SYSAGGREGATES

The sysaggregates system catalog table records user-defined aggregates (UDAs). The sysaggregates system catalog table has the following columns.

Column Name Type Explanation
name NVARCHAR(128) Aggregate name
owner NCHAR(32) Aggregate owner
aggid SERIAL Aggregate identifier
init_func NVARCHAR(128) Name of initialization UDR
iter_func NVARCHAR(128) Name of iterator UDR
combine_func NVARCHAR(128) Name of combine UDR
final_func NVARCHAR(128) Name of finalization UDR
handlesnulls BOOLEAN Whether nulls should be considered

Each UDA has one entry in sysaggregates that is uniquely identified by its aggregate identifier (the aggid column). Only new aggregates (aggregates that are not built in) have entries in sysaggregates.

SYSAMS

The sysams system catalog table contains information that is needed to use built-in access methods as well as those created by the CREATE ACCESS METHOD SQL statement that is described in the Virtual-Table Interface Programmer's Manual. The sysams table has the following columns.

Column Name Type Explanation
am_name NVARCHAR(128) Name of the access method
am_owner NCHAR(32) Owner of the access method
am_id INTEGER Unique identifier for the access method. This value corresponds to the am_id in the systables system catalog table and to the am_id in the sysindices and sysopclasses system catalog tables.
am_type NCHAR(1) Type of access method:
P = Primary
S = Secondary
am_sptype NCHAR(3) Type(s) of space(s) in which the access method can live:
D or d = dbspaces only
X or x = extspaces only
S or s = sbspaces only (smart-large-object space)
A or a = all types: extspaces, dbspaces, or sbspaces. If the access method is not user defined (that is, if it is built-in or registered during database creation by the server), it supports dbspaces.
am_defopclass INTEGER Default-operator class identifier. The opclassid from the entry for this operator class in the sysopclasses system catalog table.
am_keyscan INTEGER Whether a secondary access method supports a key scan An access method supports a key scan if it can return a key as well as a rowid from a call to the am_getnext function
Non-Zero = access method supports key scan
Zero = access method does not support key scan
am_unique INTEGER Whether a secondary access method can support unique keys
Non-Zero = access method supports unique keys
Zero = access method does not support unique keys
am_cluster INTEGER Whether a primary access method supports clustering
Non-Zero = access method supports clustering
Zero = access method does not support clustering
am_rowids INTEGER Whether a primary access method supports rowids
Non-Zero = access method supports rowids
Zero = access method does not support rowids
am_readwrite INTEGER Whether a primary access method is read/write
Non-Zero = access method is read/write
Zero = access method is read only
am_parallel INTEGER Whether an access method supports parallel execution
Non-Zero = access method supports parallel execution
Zero = access method does not support parallel execution
am_costfactor SMALLFLOAT The value to be multiplied by the cost of a scan in order to normalize it to costing done for built-in access methods. The scan cost is the output of the am_scancost function
am_create INTEGER The routine specified for the AM_CREATE purpose for this access method The value of am_create is the procid for the routine in the sysprocedures system catalog table
am_drop INTEGER The routine specified for the AM_DROP purpose for this access method The value of am_drop is the procid listed for the routine in the sysprocedures system catalog table
am_open INTEGER The routine specified for the AM_OPEN purpose for this access method The value of am_open is the procid listed for the routine in the sysprocedures system catalog table
am_close INTEGER The routine specified for the AM_CLOSE purpose for this access method The value of am_close is the procid listed for the routine in the sysprocedures system catalog table
am_insert INTEGER The routine specified for the AM_INSERT purpose for this access method The value of am_insert is the procid listed for the routine in the sysprocedures system catalog table
am_delete INTEGER The routine specified for the AM_DELETE purpose for this access method The value of am_delete is the procid listed for the routine in the sysprocedures system catalog table
am_update INTEGER The routine specified for the AM_UPDATE purpose for this access method The value of am_update is the procid listed for the routine in the sysprocedures system catalog table
am_stats INTEGER The routine specified for the AM_STATS purpose for this access method The value of am_stats is the procid listed for the routine in the sysprocedures system catalog table
am_scancost INTEGER The routine specified for the AM_SCANCOST purpose for this access method The value of am_scancost is the procid listed for the routine in the sysprocedures system catalog table
am_check INTEGER The routine specified for the AM_CHECK purpose for this access method The value of am_check is the procid listed for the routine in the sysprocedures system catalog table
am_beginscan INTEGER The routine specified for the AM_BEGINSCAN purpose for this access method The value of am_beginscan is the procid listed for the routine in the sysprocedures system catalog table
am_endscan INTEGER The routine specified for the AM_ENDSCAN purpose for this access method The value of am_endscan is the procid listed for the routine in the sysprocedures system catalog table
am_rescan INTEGER The routine specified for the AM_RESCAN purpose for this access method The value of am_rescan is the procid listed for the routine in the sysprocedures system catalog table
am_getnext INTEGER The routine specified for the AMGETNEXT purpose for this access method The value of am_getnext is the procid listed for the routine in the sysprocedures system catalog table
am_getbyid INTEGER The routine specified for the AM_GETBYID purpose for this access method The value of am_getbyid is the procid listed for the routine in the sysprocedures system catalog tables
am_build Reserved for future use
am_init INTEGER For internal use

The composite index for the am_name and am_owner columns in this table allows only unique values. The am_id column is indexed and must contain unique values.

The am_sptype column can have multiple entries. For example:

For information about access method functions, refer to the documentation for your custom access method.

SYSATTRTYPES

The sysattrtypes system catalog table contains information about members of a complex data type. Each row of sysattrtypes contains information about elements of a collection data type or fields of a row data type. The sysattrtypes system catalog table has the following columns.

Column Name Type Explanation
extended_id INTEGER Identifier for extended data types, same as in sysxtdtypes
seqno SMALLINT Value to order and identify entries for specific values of extended_id
levelno SMALLINT Position of member in collection hierarchy
parent_no SMALLINT Value in the seqno column of the complex type that contains this member
fieldname NVARCHAR(128) Name of the field in a row type. Null for other complex types
fieldno SMALLINT Field number sequentially assigned by the system (from left to right within each row type)
type SMALLINT Identifier of the data type. For a complete list of values associated with different data types, see the coltype column entries in the syscolumns system catalog table.
length SMALLINT Length of the data type
xtd_type_id INTEGER The identifier used for this data type in the extended_id column of the sysxtdtypes system catalog table

The two indexes on the extended_id column and the xtd_type_id column, respectively, allow duplicate values. The composite index on extended_id and seqno columns allows only unique values.

SYSBLOBS

The title sysblobs is a legacy name based on a term that was used to refer to BYTE and TEXT columns (also known as simple large objects).

The sysblobs system catalog table specifies the storage location of a BYTE or TEXT column. It contains one row for each BYTE or TEXT column in a table. The sysblobs system catalog table has the following columns.

Column Name Type Explanation
spacename NVARCHAR(128) Partition BYTE or TEXT data, dbspace, or family name
type NCHAR(1) Media type:
M = Magnetic
O = Optical. Only available for Dynamic Server
tabid INTEGER Table identifier
colno SMALLINT Column number

A composite index for the tabid and colno columns allows only unique values.

For information about the location and size of chunks of blobspaces, dbspaces, and sbspaces for TEXT, BYTE, BLOB, and CLOB columns, see your Administrator's Guide and the Administrator's Reference.

SYSCASTS

The syscasts system catalog table describes the casts in the database. It contains one row for each built-in cast and one row for each implicit or explicit cast that a user defines. The syscasts system catalog table has the following columns.

Column Name Type Explanation
owner NCHAR(32) Owner of cast (user informix for built-in casts and user name for implicit and explicit casts)
argument_type SMALLINT Source data type on which the cast operates
argument_xid INTEGER Data type identifier of the source data type named in the argument_type column
result_type SMALLINT Data type returned by the cast
result_xid INTEGER Data type identifier of the data type named in the result_type column
routine_name NVARCHAR(128) Function or procedure used to implement the cast (might be null if the data types named in the argument_type and result_type columns have the same length and alignment and are both passed either by reference or by value)
routine_owner NCHAR(32) User name of the owner of the function or procedure named in the routine_name column
class NCHAR Type of cast:
E = Explicit cast
I = Implicit cast
S = Built-in cast

If routine_name and routine_owner have null values, it indicates that the cast is defined without a routine.

The index on columns argument_type, argument_xid, result_type, and result_xid allows only unique values. The index on columns argument_type and argument_xid allows duplicate values.

SYSCHECKS

The syschecks system catalog table describes each check constraint defined in the database. Because the syschecks system catalog table stores both the ASCII text and a binary encoded form of the check constraint, it contains multiple rows for each check constraint. The syschecks system catalog table has the following columns.

Column Name Type Explanation
constrid INTEGER Constraint identifier
type NCHAR(1) Form in which the check constraint is stored:
B = Binary encoded
T = ASCII text
seqno SMALLINT Line number of the check constraint
checktext NCHAR(32) Text of the check constraint

A composite index for the constrid, type, and seqno columns allows only unique values.

The text in the checktext column associated with B type in the type column is in computer-readable format. To view the text associated with a particular check constraint, use the following query with the appropriate constraint ID:

Each check constraint described in the syschecks system catalog table also has its own row in the sysconstraints system catalog table.

SYSCOLATTRIBS

The syscolattribs system catalog table describes the characteristics of smart large objects, namely CLOB and BLOB data types. It contains one row for each characteristic. The syscolattribs system catalog table has the following columns.

Column Name Type Explanation
tabid INTEGER Table identifier
colno SMALLINT Column number
extentsize INTEGER Pages in smart-large-object extent, expressed in kilobytes
flags INTEGER An integer representation of the combination (addition) of hexadecimal values of the following parameters:
LO_NOLOG The smart large object is not logged.
LO_LOG Logging of smart- large-object data is done in accordance with the current database log mode.
LO_KEEP_LASTACCESS_TIME A record is kept of the most recent access of this smart-large-object column by a user.
LO_NOKEEP_LASTACCESS_TIME No record is kept of the most recent access of this smart-large-object column by a user.
HI_INTEG Data pages have headers and footers to detect incomplete writes and data corruption.
MODERATE_INTEG (Not available at this time) Data pages do not have headers and footers.
flags1 INTEGER Reserved for future use
sbspace NVARCHAR(128) Name of sbspace

SYSCOLAUTH

The syscolauth system catalog table describes each set of privileges granted on a column. It contains one row for each set of column privileges granted in the database. The syscolauth system catalog table has the following columns.

Column Name Type Explanation
grantor NCHAR(32) Grantor of privilege
grantee NCHAR(32) Grantee of privilege
tabid INTEGER Table identifier
colno SMALLINT Column number
colauth NCHAR(3) 3-byte pattern that specifies column privileges:
s = Select
u = Update
r = References

If the colauth privilege code is uppercase (for example, S for select), a user who has this privilege can also grant it to others. If the colauth privilege code is lowercase (for example, s for select), the user who has this privilege cannot grant it to others.

A composite index for the tabid, grantor, grantee, and colno columns allows only unique values. A composite index for the tabid and grantee columns allows duplicate values.

SYSCOLDEPEND

The syscoldepend system catalog table tracks the table columns specified in check and not null constraints. Because a check constraint can involve more than one column in a table, the syscoldepend table can contain multiple rows for each check constraint. One row is created in the syscoldepend table for each column involved in the constraint. The syscoldepend system catalog table has the following columns.

Column Name Type Explanation
constrid INTEGER Constraint identifier
tabid INTEGER Table identifier
colno SMALLINT Column number

A composite index for the constrid, tabid, and colno columns allows only unique values. A composite index for the tabid and colno columns allows duplicate values.

SYSCOLUMNS

The syscolumns system catalog table describes each column in the database. One row exists for each column that is defined in a table or view.

Column Name Type Explanation
colname NVARCHAR(128) Column name
tabid INTEGER Table identifier
colno SMALLINT Column number that the system sequentially assigns (from left to right within each table)
coltype SMALLINT Code for column data type:
0 = CHAR 14 = INTERVAL
1 = SMALLINT 15 = NCHAR
2 = INTEGER 16 = NVARCHAR
3 = FLOAT 17 = INT8
4 = SMALLFLOAT 18 = SERIAL8 *
5 = DECIMAL 19 = SET
6 = SERIAL * 20 = MULTISET
7 = DATE 21 = LIST
8 = MONEY 22 = rOW (unnamed)
9 = NULL 23 = COLLECTION
10 = DATETIME 24 = ROWREF
11 = BYTE 40 = Variable-length opaque type
12 = TEXT 41 = Fixed-length opaque type
13 = VARCHAR 4118 = Named row type
collength SMALLINT Column length (in bytes)
colmin INTEGER Second minimum value
colmax INTEGER Second maximum value
minlen INTEGER Minimum column length (in bytes)
maxlen INTEGER Maximum column length (in bytes)
extended_id INTEGER Type identifier, from the sysxtdtypes system catalog table, of the data type named in the coltype column
* An offset value of 256 is added to these columns to indicate that they do not allow null values.

A composite index for the tabid and colno columns allows only unique values.

The coltype 4118 for named row types is the decimal representation of the hexadecimal value 0x1016, which is the same as the hexadecimal coltype value for an unnamed row type (0 x 016), with the named-row type bit set.

Null-Valued Columns

If the coltype column contains a value greater than 256, it does not allow null values. To determine the data type for a coltype column that contains a value greater than 256, subtract 256 from the value and evaluate the remainder, based on the possible coltype values. For example, if a column has a coltype value of 262, subtracting 256 from 262 leaves a remainder of 6, which indicates that this column uses a SERIAL data type.

The next sections provide the following additional information about information in the syscolumns system catalog table:

Storing Column Data Type

The database server stores the column data type as an integer value. For a list of the column data type values, see the description of the coltype column in the preceding table. The following sections provide additional information on data type values.

The following data types are implemented by the database server as built-in opaque types:

A built-in opaque data type is one for which the database server provides the type definition. Because these data types are built-in opaque types, they do not have a unique coltype value. Instead, they have one of the coltype values for opaque types: 41 (fixed-length opaque type), or 40 (varying-length opaque type). The different fixed-length opaque types are distinguished by the extended_id column in the sysxtdtypes system catalog table.

The following table summarizes the coltype values for the predefined data types.

Predefined Data Type Value for coltype Column
BLOB 41
CLOB 41
BOOLEAN 41
LVARCHAR 40

Storing Column Length

The value that the collength column holds depends on the data type of the column.

Length of Integer-Based Columns

A collength value for a SMALLINT, INTEGER, or INT8 column is not machine-dependent. The database server uses the following lengths for SQL integer-based data types.

Integer-Based Data Type Length (in bytes)
SMALLINT 2
INTEGER 4
INT8 8

The database server stores a SERIAL data type as an INTEGER value and a SERIAL8 data type as an INT8 value. Therefore, SERIAL has the same length as INTEGER (4 bytes) and SERIAL8 has the same length as INT8 (8 bytes).

Length of Fixed-Point Columns

A collength value for a MONEY or DECIMAL column is determined using the following formula:

Length of Varying-Length Character Columns

For columns of type VARCHAR, the max_size and min_space values are encoded in the collength column using one of the following formulas:

The database server uses the preceding formulas to encode the collength column for an NVARCHAR data type. For more information about the NVARCHAR data type, see the Informix Guide to GLS Functionality.

Length for Time Data Types

For columns of type DATETIME or INTERVAL, collength is determined using the following formula:

The length is the physical length of the DATETIME or INTERVAL field, and largest_qualifier and smallest_qualifier have the values that the following table shows.

Field Qualifier Value
YEAR 0
MONTH 2
DAY 4
HOUR 6
MINUTE 8
SECOND 10
FRACTION(1) 11
FRACTION(2) 12
FRACTION(3) 13
FRACTION(4) 14
FRACTION(5) 15

For example, if a DATETIME YEAR TO MINUTE column has a length of 12 (such as YYYY:DD:MM:HH:MM), a largest_qualifier value of 0 (for YEAR), and a smallest_qualifier value of 8 (for MINUTE), the collength value is 3080 or (256 * 12) + (0 * 16) + 8.

Length of Simple-Large-Object Columns

If the data type of the column is BYTE or TEXT, collength holds the length of the descriptor.

Storing Maximum and Minimum Values

The colmin and colmax column values hold the second-smallest and second-largest data values in the column, respectively. For example, if the values in an indexed column are 1, 2, 3, 4, and 5, the colmin value is 2 and the colmax value is 4. Storing the second-smallest and second-largest data values lets the database server make assumptions about the range of values in a given column and, in turn, further optimize searching strategies.

The colmin and colmax columns contain values only if the column is indexed and you have run the UPDATE STATISTICS statement. If you store BYTE or TEXT data in the tblspace, the colmin value is -1. The values for all other noninteger column types are the initial 4 bytes of the maximum or minimum value, which are treated as an integer.

The database server does not calculate colmin and colmax values for user-defined data types. However, these columns have values for user-defined data types if a user-defined secondary access method supplies them.

SYSCONSTRAINTS

The sysconstraints system catalog table lists the constraints placed on the columns in each database table. An entry is also placed in the sysindexes (sysindices for Dynamic Server) system catalog table for each unique, primary key, or referential constraint that you create, if the constraint does not already have a corresponding entry in the sysindexes or sysindices system catalog table. Because indexes can be shared, more than one constraint can be associated with an index. The sysconstraints system catalog table has the following columns.

Column Name Type Explanation
constrid SERIAL System-assigned sequential identifier
constrname NVARCHAR(128) Constraint name
owner NCHAR(32) User name of owner
tabid INTEGER Table identifier
constrtype NCHAR(1) Constraint type:
C = Check constraint
P = Primary key
R = Referential
U = Unique
N = Not null
idxname NVARCHAR(128) Index name

A composite index for the constrname and owner columns allows only unique values. The index for the tabid column allows duplicate values, and the index for the constrid column allows only unique values.

For check constraints (where constrtype = C), the idxname is always null. Additional information about each check constraint is contained in the syschecks system catalog table.

SYSDEFAULTS

The sysdefaults system catalog table lists the user-defined defaults that are placed on each column in the database. One row exists for each user-defined default value. If a default is not explicitly specified in the CREATE TABLE statement, no entry exists in this table. The sysdefaults system catalog table has the following columns.

Column Name Type Explanation
tabid INTEGER Table identifier
colno SMALLINT Column identifier
type NCHAR(1) Default type:
L = Literal default
U = User
C = Current
N = Null
T = Today
S = Dbservername
default NCHAR(256) If default type = L, the literal default value
class CHAR(1) Type of column:
T = table
t = row type

If you specify a literal for the default value, it is stored in the default column as ASCII text. If the literal value is not of type NCHAR, the default column consists of two parts. The first part is the 6-bit representation of the binary value of the default value structure. The second part is the default value in English text. A space separates the two parts.

If the data type of the column is not NCHAR or NVARCHAR, a binary representation is encoded in the default column. A composite index for the tabid, colno, and class columns allows only unique values.

SYSDEPEND

The sysdepend system catalog table describes how each view or table depends on other views or tables. One row exists in this table for each dependency, so a view based on three tables has three rows. The sysdepend system catalog table has the following columns.

Column Name Type Explanation
btabid INTEGER Table identifier of base table or view
btype NCHAR(1) Base object type:
T = Table
V = View
dtabid INTEGER Table identifier of dependent table
dtype NCHAR(1) Dependent object type (V = View); currently, only view is implemented

The btabid and dtabid columns are indexed and allow duplicate values.

SYSDISTRIB

The sysdistrib system catalog table stores data-distribution information for the database server to use. Data distributions provide detailed table-column information to the optimizer to improve the choice of execution paths of SQL SELECT statements.

Information is stored in the sysdistrib system catalog table when an UPDATE STATISTICS statement with mode MEDIUM or HIGH is run for a table. (UPDATE STATISTICS LOW does not insert a value in the mode column of sysdistrib.)

The sysdistrib system catalog table has the following columns.

Column Name Type Explanation
tabid INTEGER Table identifier of the table where data was gathered
colno SMALLINT Column number in the source table
seqno INTEGER Sequence number for multiple entries
constructed DATE Date when the data distribution was created
mode NCHAR(1) Optimization level:
M = Medium
H = High
resolution FLOAT Specified in the UPDATE STATISTICS statement
confidence FLOAT Specified in the UPDATE STATISTICS statement
encdat STAT Statistics information
type NCHAR(1) Type of statistics:
A = encdat has ASCII-encoded histogram in fixed-length character field
S = encdat has-user defined statistics
udtstat STAT UDT statistics information

You can select any column from sysdistrib except encdat and udtstat. Only user informix can select the encdat and udtstat columns.

Each row in the sysdistrib system catalog table is keyed by the tabid and colno for which the statistics are collected.

For built-in data type columns, the type field is set to A. The encdat column stores an ASCII-encoded histogram that is broken down into multiple rows, each of which contains 256 bytes.

For UDT columns, the type field is set to S. The encdat column stores the statistics collected by the statcollect UDR in multirepresentational form. Only one row is stored for each tabid and colno pair.

The sysdistrib system catalog table supports extensions for user-defined statistics in Dynamic Server only.

SYSERRORS

The syserrors system catalog table stores information about error, warning, and informational messages returned by DataBlade modules and user-defined routines using the mi_db_error_raise() DataBlade API function.

To create a new message, insert a row directly into the syserrors system catalog table. By default, all users can view this table, but only users with the DBA privilege can modify it. The syserrors system catalog table has the following columns.

Column Name Type Explanation
sqlstate NCHAR(5) SQLSTATE value associated with the error. For more information about SQLSTATE values and their meanings, see the GET DIAGNOSTICS statement in the Informix Guide to SQL: Syntax.
locale NCHAR(36) The locale with which this version of the message is associated (for example, `en_us.8859-1')
level Reserved for future use
seqno Reserved for future use
message NVARCHAR(255) Message text

The composite index on columns sqlstate, locale, level and seqno allows only unique values.

SYSEXTCOLS

The sysextcols system catalog table contains a row that describes each of the internal columns in external table tabid of format type (fmttype) FIXED. No entries are stored in sysextcols for DELIMITED or Informix-format external files.

Column Type Description
tabid INTEGER Table identifier
colno SMALLINT Column identifier
exttype SMALLINT External column type
extstart SMALLINT Starting position of column in the external data file
extlength SMALLINT External column length in bytes
nullstr NCHAR(256) Represents null in external data
picture NCHAR(256) Reserved for future use
decimal SMALLINT Precision for external decimals
extstype NCHAR(18) The external type name

You can use DBSCHEMA to write out the description of the external tables. To query these catalogs about an external table, use the tabid as stored in systables with tabtype = `E'.

SYSEXTDFILES

For each external table, at least one row exists in the sysextdfiles system catalog table.

Column Type Description
tabid INTEGER Table identifier
dfentry NCHAR(152) Data file entry

You can use DBSCHEMA to write out the description of the external tables. To query these system catalogs about an external table, use the tabid as stored in systables with tabtype = `E'.

SYSEXTERNAL

For each external table, a single row exists in the sysexternal system catalog table. The tabid column associates the external table in this system catalog table with an entry in systables.

Column Type Description
tabid INTEGER Table identifier
fmttype NCHAR(1) `D' (delimiter), `F' (fixed), `I' (Informix)
recdelim NCHAR(4) The record delimiter
flddelim NCHAR(4) The field delimiter
codeset NCHAR(18) ASCII, EBCDIC
datefmt NCHAR(8) Reserved for future use
moneyfmt NCHAR(20) Reserved for future use
maxerrors INTEGER Number of errors to allow per coserver
relectfile NCHAR(128) Name of reject file
flags INTEGER Optional load flags
ndfiles INTEGER Number of data files in sysextdfiles

You can use DBSCHEMA to write out the description of the external tables. To query these catalogs about an external table, use the tabid as stored in systables with tabtype = `E'.

SYSFRAGAUTH

The sysfragauth system catalog table stores information about the privileges that are granted on table fragments.

The sysfragauth system catalog table has the following columns.

Column Name Type Explanation
grantor NCHAR(32) Grantor of privilege
grantee NCHAR(32) Grantee of privilege
tabid INTEGER Table identifier of the table that contains the fragment named in the fragment column.
fragment NVARCHAR(128) Name of dbspace where fragment is stored. Identifies the fragment on which privileges are granted.
fragauth NCHAR(6) A 6-byte pattern that specifies fragment-level privileges (including 3 bytes reserved for future use). This pattern contains one or more of the following codes:
u = Update
i = Insert
d = Delete

If a code in the fragauth column is lowercase (such as u for Update), the grantee cannot grant the privilege to other users. If a code in the fragauth column is uppercase (such as U for Update), the grantee can grant the privilege to other users.

A composite index for the tabid, grantor, grantee, and fragment columns allows only unique values. A composite index on the tabid and grantee columns allows duplicate values.

The following example displays the fragment-level privileges for one base table, as they appear in the sysfragauth system catalog table. The grantee ted can grant the UPDATE, DELETE, and INSERT privileges to other users.

grantor grantee tabid fragment fragauth
dba dick 101 dbsp1 -ui---
dba jane 101 dbsp3 --i---
dba mary 101 dbsp4 --id--
dba ted 101 dbsp2 -UID--

SYSFRAGMENTS

The sysfragments system catalog table stores fragmentation information for tables and indexes. One row exists for each table or index fragment.

The sysfragments table has the following columns.

Column Name Type Explanation
fragtype NCHAR(1) Fragment type:
I = Index
T = Table
B = TEXT or BYTE data
(Enterprise Decision Server)
i = Index fragments of a duplicated table (Enterprise Decision Server)
d = data fragments of a duplicated table (Enterprise Decision Server)
tabid INTEGER Table identifier
indexname NVARCHAR(128) Index identifier
colno INTEGER TEXT or BYTE column identifier Replica identifier (Enterprise Decision Server)
partn INTEGER Physical location identifier
strategy NCHAR(1) Distribution scheme type:
R = Round-robin strategy was used to distribute the fragments
E = Expression-based strategy was used to distribute the fragments
T = Table-based strategy was used to distribute the fragments
I = IN DBSPACE clause specified a specific location as part of the fragmentation strategy
H = hash-based strategy was used to distribute the fragments
(Enterprise Decision Server)
location NCHAR(1) Reserved for future use; shows L for local
servername NVARCHAR(128) Reserved for future use
evalpos INTEGER Position of fragment in the fragmentation list
exprtext TEXT Expression that was entered for fragmentation strategy For Enterprise Decision Server, contains the names of the columns that are hashed. Contains composite information for hybrid fragmentation strategies; shows hashed columns followed by the fragmentation expression of the dbslice.
exprbin BYTE Binary version of expression
exprarr BYTE Range-partitioning data used to optimize expression in range-expression fragmentation strategy
flags INTEGER Used internally For Enterprise Decision Server, a bit value indicates the existence of a hybrid fragmentation strategy (value = 0x10). Also, an additional flag (value = 0x20) will be set on the first fragment of a globally detached index.
dbspace NVARCHAR(128) Dbspacename for fragment
levels SMALLINT Number of B+ tree index levels
npused INTEGER For table-fragmentation strategy, npused represents the number of data pages; for index-fragmentation strategy, npused represents the number of leaf pages.
nrows INTEGER For tables, nrows represents the number of rows in the fragment; for indexes, nrows represents the number of unique keys.
clust INTEGER Degree of index clustering; smaller numbers correspond to greater clustering
hybdpos INTEGER Contains the relative position of the hybrid fragment within a dbslice or list of dbspaces associated with a particular expression. The hybrid fragmentation strategy and the set of fragments against which the hybrid strategy is applied determines the relative position. The first fragment has a hybdpos value of zero (0). (Enterprise Decision Server)

The strategy type T is used for attached indexes (where index fragmentation is the same as the table fragmentation).

The composite index on the fragtype, tabid, indexname, and evalpos columns allows duplicate values.

The hybdpos field is the last field of the composite key in the fraginfo index on the SYSFRAGMENTS table.

SYSINDEXES

The sysindexes system catalog table describes the indexes in the database. It contains one row for each index that is defined in the database. The sysindexes system catalog table has the following columns.

Column Name Type Explanation
idxname NVARCHAR(18) Index name
owner NCHAR(32) Owner of index (user informix for system catalog tables and user name for database tables)
tabid INTEGER Table identifier
idxtype NCHAR(1) Index type:
U = Unique
G = Nonbitmap generalized-key index
(Enterprise Decision Server only)
D = Duplicates
g = Bitmap generalized-key index
(Enterprise Decision Server only)
u = unique, bitmap
(Enterprise Decision Server only)
d = nonunique, bitmap
(Enterprise Decision Server only)
clustered NCHAR(1) Clustered or nonclustered index (C = Clustered)
part1 SMALLINT Column number (colno) of a single index or the 1st component of a composite index
part2 SMALLINT 2nd component of a composite index
part3 SMALLINT 3rd component of a composite index
part4 SMALLINT 4th component of a composite index
part5 SMALLINT 5th component of a composite index
part6 SMALLINT 6th component of a composite index
part7 SMALLINT 7th component of a composite index
part8 SMALLINT 8th component of a composite index
part9 SMALLINT 9th component of a composite index
part10 SMALLINT 10th component of a composite index
part11 SMALLINT 11th component of a composite index
part12 SMALLINT 12th component of a composite index
part13 SMALLINT 13th component of a composite index
part14 SMALLINT 14th component of a composite index
part15 SMALLINT 15th component of a composite index
part16 SMALLINT 16th component of a composite index
levels SMALLINT Number of B+ tree levels
leaves INTEGER Number of leaves
nunique INTEGER Number of unique keys in the first column
clust INTEGER Degree of clustering: smaller numbers correspond to greater clustering
idxflags INTEGER Stores the current locking mode of the index:
Normal = 0x01
Coarse = 0x02

Changes that affect existing indexes are reflected in this table only after you run the UPDATE STATISTICS statement.

Each partnth column component of a composite index (the part1 through part16 columns in this table) holds the column number (colno) of each part of the 16 possible parts of a composite index. If the component is ordered in descending order, the colno is entered as a negative value.

The clust column is blank until the UPDATE STATISTICS statement is run on the table. The maximum value is the number of rows in the table, and the minimum value is the number of data pages in the table.

The tabid column is indexed and allows duplicate values. A composite index for the idxname, owner, and tabid columns allows only unique values.

SYSINDICES

The sysindices system catalog table describes the indexes in the database. It contains one row for each index that is defined in the database. The sysindices system catalog table has the following columns.

Column Name Type Explanation
idxname NVARCHAR(128) Index name
owner NCHAR(32) Owner of index (user informix for system catalog tables and user name for database tables)
tabid INTEGER Table identifier
idxtype NCHAR(1) Index type:
U = Unique
D = Duplicates
clustered NCHAR(1) Clustered or nonclustered index
(C = Clustered)
levels SMALLINT Number of tree levels
leaves INTEGER Number of leaves
nunique INTEGER Number of unique keys in the first column
clust INTEGER Degree of clustering: smaller numbers correspond to greater clustering. The maximum value is the number of rows in the table, and the minimum value is the number of data pages in the table.

This column is blank until the UPDATE STATISTICS statement is run on the table.

nrows INTEGER Estimated number of rows in the table (zero until UPDATE STATISTICS is run on the table).
indexkeys INDEXKEYARRAY This column has a maximum of three fields, displayed in the following form: <function id>(col1, ..., coln) [operator class id] The function id shows only if the index is on return values of a function defined over the columns of the table; that is, if it is a functional index. The function id is the same as the procid of the function showing in the sysprocedures system catalog table. The list of the columns (col1,..., coln) in the second field gives columns over which the index is defined. The operator class id signifies the particular secondary access method used to build and search the index.
amid INTEGER Identifier of the access method used to implement this index. It is the value of the am_id for that access method in the sysams system catalog table.
amparam LVARCHAR List of parameters used to customize the behavior of this access method.

Tip: This system catalog table is changed from the system catalog table in the 7.2 version of the Informix database server. The previous version of this system catalog table is still available as a view and can be accessed under its original name: sysindexes. The columns part1 through part16 in sysindexes are filled in for B-tree indexes that do not use user-defined types or functional indexes. For generic B-trees and all other access methods, the part1 to part16 columns contain zeros.

Changes that affect existing indexes are reflected in this system catalog table only after you run the UPDATE STATISTICS statement.

The tabid column is indexed and allows duplicate values. A composite index for the idxname, owner, and tabid columns allows only unique values.

The system indexes tabid and idxname are used to index sysindices.

SYSINHERITS

The sysinherits system catalog table stores information about table and type inheritance. Every supertype, subtype, supertable, and subtable in the database has a corresponding row in the sysinherits table. The sysinherits system catalog table has the following columns.

Column Name Type Explanation
child INTEGER Identifier of the subtable or subtype in an inheritance relationship
parent INTEGER Identifier of the supertable or supertype in an inheritance relationship
class NCHAR(1) Inheritance class:
t = named row type
T = table

SYSLANGAUTH

The syslangauth system catalog table contains the authorization information on computer languages that are used to write user-defined routines (UDRs).

Column Name Type Explanation
grantor NCHAR(32) The grantor of the language authorization
grantee NCHAR(32) The grantee of the language authorization
langid INTEGER The language id reference to the sysroutinelangs system catalog table
langauth NCHAR(1) The language authorization
u = Usage permission granted
U = Usage permission granted WITH GRANT OPTION

A nonunique index on the langid and grantee columns is created for faster access to the syslangauth table.

SYSLOGMAP

The syslogmap system catalog table is not implemented in this version

Column Name Type Explanation
tabloc Reserved for future use
tabid Reserved for future use
fragid Reserved for future use
flags Reserved for future use
.

SYSNEWDEPEND

The sysnewdepend system catalog table contains information about generalized-key indexes that is not available in the sysindexes system catalog table. The dependencies between a generalized-key index and the tables in the FROM clause of the CREATE INDEX statement are stored in the sysnewdepend system catalog table. The sysnewdepend system catalog table has the following columns.

Column Name Type Explanation
scrid1 char The name of the generalized-key index
scrid2 INTEGER The tableid of the indexed table
type INTEGER The type of generalized-key index
destid1 INTEGER The tableid of the table that the generalized-key index depends
destid2 INTEGER The column name in the table that the generalized-key index depends

SYSOBJSTATE

The sysobjstate system catalog table stores information about the state (object mode) of database objects. The types of database objects listed in this table are indexes, triggers, and constraints.

Every index, trigger, and constraint in the database has a corresponding row in the sysobjstate table if a user creates the object. Indexes that the database server creates on the system catalog tables are not listed in the sysobjstate table because their object mode cannot be changed.

The sysobjstate system catalog table has the following columns.

Column Name Type Explanation
objtype NCHAR(1) The type of database object. This column has one of the following codes:
C = Constraint
I = Index
T = Trigger
owner NCHAR(32) The owner of the database object
name NVARCHAR(128) The name of the database object
tabid INTEGER Table identifier of the table on which the database object is defined
state NCHAR(1) The current state (object mode) of the database object. This column has one of the following codes:
D = Disabled
E = Enabled
F = Filtering with no integrity-violation errors
G = Filtering with integrity-violation errors

A composite index for the objtype, name, owner, and tabid columns allows only unique values.

SYSOPCLASSES

The sysopclasses system catalog table contains information about operator classes associated with secondary access methods. It contains one row for each operator class that has been defined. The sysopclasses system catalog table has the following columns.

Column Name Type Explanation
opclassname NVARCHAR(128) Name of the operator class
owner NCHAR(32) Owner of the operator class
amid INTEGER Identifier of the secondary access method associated with this operator class
opclassid SERIAL Identifier of the operator class. This identifier is used in the sysams system catalog table to specify the default operator class (am_defopclass) for the access method.
ops LVARCHAR List of names of the operators that belong to this operator class
support LVARCHAR List of names of support functions defined for this operator class

The sysopclasses system catalog table has two indexes. There is a composite index on opclassname and owner columns and an index on opclassid column. Both indexes allow only unique values.

SYSOPCLSTR

The sysopclstr system catalog table defines each optical cluster in the database. It contains one row for each optical cluster.

The sysopclstr system catalog table has the following columns.

Column Name Type Explanation
owner NCHAR(32) Owner of the cluster
clstrname NVARCHAR(128) Name of the cluster
clstrsize INTEGER Size of the cluster
tabid INTEGER Table identifier
blobcol1 SMALLINT BYTE or TEXT column number 1
blobcol2 SMALLINT BYTE or TEXT column number 2
blobcol3 SMALLINT BYTE or TEXT column number 3
blobcol4 SMALLINT BYTE or TEXT column number 4
blobcol5 SMALLINT BYTE or TEXT column number 5
blobcol6 SMALLINT BYTE or TEXT column number 6
blobcol7 SMALLINT BYTE or TEXT column number 7
blobcol8 SMALLINT BYTE or TEXT column number 8
blobcol9 SMALLINT BYTE or TEXT column number 9
blobcol10 SMALLINT BYTE or TEXT column number 10
blobcol11 SMALLINT BYTE or TEXT column number 11
blobcol12 SMALLINT BYTE or TEXT column number 12
blobcol13 SMALLINT BYTE or TEXT column number 13
blobcol14 SMALLINT BYTE or TEXT column number 14
blobcol15 SMALLINT BYTE or TEXT column number 15
blobcol16 SMALLINT BYTE or TEXT column number 16
clstrkey1 SMALLINT Cluster key number 1
clstrkey2 SMALLINT Cluster key number 2
clstrkey3 SMALLINT Cluster key number 3
clstrkey4 SMALLINT Cluster key number 4
clstrkey5 SMALLINT Cluster key number 5
clstrkey6 SMALLINT Cluster key number 6
clstrkey7 SMALLINT Cluster key number 7
clstrkey8 SMALLINT Cluster key number 8
clstrkey9 SMALLINT Cluster key number 9
clstrkey10 SMALLINT Cluster key number 10
clstrkey11 SMALLINT Cluster key number 11
clstrkey12 SMALLINT Cluster key number 12
clstrkey13 SMALLINT Cluster key number 13
clstrkey14 SMALLINT Cluster key number 14
clstrkey15 SMALLINT Cluster key number 15
clstrkey16 SMALLINT Cluster key number 16

A composite index for both the clstrname and owner columns allows only unique values. The tabid column allows duplicate values.

SYSPROCAUTH

The sysprocauth system catalog table describes the privileges granted on a procedure or function. It contains one row for each set of privileges that are granted. The sysprocauth system catalog table has the following columns.

Column Name Type Explanation
grantor NCHAR(32) Grantor of routine
grantee NCHAR(32) Grantee of routine
procid INTEGER Routine identifier
procauth NCHAR(1) Type of routine permission granted:
e = Execute permission on routine
E = Execute permission and the ability to grant it to others

A composite index for the procid, grantor, and grantee columns allows only unique values. The composite index for the procid and grantee columns allows duplicate values.

SYSPROCBODY

The sysprocbody system catalog table describes the compiled version of each procedure or function in the database. Because the sysprocbody system catalog table stores the text of the routine, each routine can have multiple rows. The sysprocbody system catalog table has the following columns.

Column Name Type Explanation
procid INTEGER Routine identifier
datakey NCHAR(1) Data-descriptor type:
D = User document text
T = Actual routine source
R = Return value type list
S = Routine symbol table
L = Constant routine data string (that is, literal numbers or quoted strings)
P = Interpreter instruction code
seqno INTEGER Line number of the routine
data NCHAR(256) Actual text of the routine

Although the datakey column indicates the type of data that is stored, the data column contains the actual data, which can be one of the following types:

A composite index for the procid, datakey, and seqno columns allows only unique values.

SYSPROCEDURES

The sysprocedures system catalog table lists the characteristics for each function and procedure in the database. It contains one row for each routine.

For Enterprise Decision Server, the sysprocedures system catalog table has the following columns.

Column Name Type Explanation
procname NVARCHAR(128) Routine name
owner NCHAR(32) Owner name
procid SERIAL Routine identifier
mode NCHAR(1) Mode type:
D, d = DBA
O, o = Owner
P, p = Protected
R, r = Restricted
retsize INTEGER Compiled size (in bytes) of values
symsize INTEGER Compiled size (in bytes) of symbol table
datasize INTEGER Compiled size (in bytes) constant data
codesize INTEGER Compiled size (in bytes) of routine instruction code
numargs INTEGER Number of routine arguments

For Dynamic Server, the sysprocedures system catalog table has the following columns.

Column Name Type Explanation
procname NVARCHAR(128) Routine name
owner NCHAR(32) Owner name
procid SERIAL Routine identifier
mode NCHAR(1) Mode type:
D, d = DBA
O, o = Owner
P, p = Protected
R, r = Restricted
retsize INTEGER Compiled size (in bytes) of values
symsize INTEGER Compiled size (in bytes) of symbol table
datasize INTEGER Compiled size (in bytes) constant data
codesize INTEGER Compiled size (in bytes) of routine instruction code
numargs INTEGER Number of routine arguments
isproc NCHAR(1) Whether the routine is a procedure or a function
t = procedure
f = function
specificname NVARCHAR(128) The specific name for the routine
externalname NVARCHAR(255) Location of the external routine. This item is language-specific in content and format.
paramstyle NCHAR(1) Parameter style
I = Informix
langid INTEGER Language identifier (from the sysroutinelangs system catalog table)
paramtypes rtnparamtypes Data types of the parameters; rtnparamtypes indicates a built-in data type
variant BOOLEAN Indicates whether the routine is VARIANT or not
t = is variant
f = is not variant
handlesnulls BOOLEAN Null handling indicator:
t = handles nulls
f = does not handle nulls
percallcost INTEGER Amount of CPU per call; integer cost to execute UDR: cost/call - 0 -(2^31-1)
commutator NVARCHAR(128) Field commutator
negator NVARCHAR(128) Negator function name
selfunc NVARCHAR(128) Function used to estimate function selectivity
iterator BOOLEAN Iterator routine
internal BOOLEAN Whether the routine can be called from SQL
t = routine is internal, not callable from SQL
f = routine is external, can be called from SQL
class NCHAR(18) CPU class in which the routine should be executed
stack INTEGER Stack size in bytes required per invocation
costfunc NVARCHAR(128) Name of cost function for UDR
selconst INTEGER Selectivity constant for UDR
parallelizable BOOLEAN Parallelization indicator for UDR:
t = Parallelizable
f = Not parallelizable

A unique index on the procid column indexes the routine id. A composite index on the procname, isproc, numargs, and owner columns maintains the uniqueness of the routines in the database. This index allows duplicate values. The index on the specificname and owner columns maintains the uniqueness of the routines with specific names. It allows duplicate values.

For the sysprocedures system catalog table, the R mode is a special case of the O mode. A routine is in restricted (R) mode if it was created with a specified owner that is different from the routine creator. If routine statements involving a remote database are executed, the database server uses the permissions of the user that executes the routine instead of the permissions of the routine owner. In all other scenarios, R mode routines behave the same as O mode routines.

Starting with Version 9.x, protected routines (which cannot be deleted) are indicated differently in the mode column. In earlier versions, protected routines were simply indicated by a P. Currently, protected routines are treated as DBA routines and cannot be Owner routines. Thus D and O indicate DBA and Owner routines, and d and o indicate protected DBA and protected Owner routines.

Important: After a SET SESSION AUTHORIZATION is done, all owner routines created while using the new identity are given a restricted mode.

A database server can create protected routines for internal use. The sysprocedures table identifies these protected routines with the letter P or p in the mode column. You cannot modify or drop protected routines or display them through dbschema.

SYSPROCPLAN

The sysprocplan system catalog table describes the query-execution plans and dependency lists for data-manipulation statements within each routine. If new plans are generated during the execution of a routine, the new plans are also recorded in sysprocplan. Because different parts of a routine plan can be created on different dates, the table can contain multiple rows for each routine.

It is possible to delete all the plans for a particular routine with the DELETE statement on sysprocplan. When the routine is executed, new plans are automatically generated and recorded in sysprocplan.

Only Dynamic Server stores plans in sysprocplan.

The sysprocplan system catalog table has the following columns.

Column Name Type Explanation
procid INTEGER Routine identifier
planid INTEGER Plan identifier
datakey NCHAR(1) Identifier routine plan part:
D = Dependency list
Q = Execution plan
seqno INTEGER Line number of plan
created DATE Date plan created
datasize INTEGER Size (in bytes) of the list or plan
data NCHAR(256) Encoded (compiled) list or plan

A composite index for the procid, planid, datakey, and seqno columns allows only unique values.

SYSREFERENCES

The sysreferences system catalog table lists the referential constraints that are placed on columns in the database. It contains a row for each referential constraint in the database. The sysreferences system catalog table has the following columns.

Column Name Type Explanation
constrid INTEGER Constraint identifier
primary INTEGER Constraint identifier of the corresponding primary key
ptabid INTEGER Table identifier of the primary key
updrule NCHAR(1) Reserved for future use; displays an R
delrule NCHAR(1) Displays cascading delete or restrict rule:
C = Cascading delete
R = Restrict (default)
matchtype NCHAR(1) Reserved for future use; displays an N
pendant NCHAR(1) Reserved for future use; displays an N

The constrid column is indexed and allows only unique values. The primary column is indexed and allows duplicate values.

SYSREPOSITORY

The sysrepository system catalog table contains information about generalized-key indexes that is not available in the sysindexes system catalog table. The sysrepository system catalog table contains the CREATE statement for each generalized-key index in the database in its desc column. The contents of the sysrepository system catalog table are useful when a generalized-key index has to be rebuilt during a recovery or if a user wants to see the CREATE statement for a specific generalized-key index.

Column Name Type Explanation
id1 NCHAR Index from the generalized-key index
id2 INTEGER Tabid of table with the generalized-key index
type INTEGER Integer representing object type In this release, the only integer that shows is 1, indicating generalized-key index type.
seqid INTEGER For future use
desc TEXT The CREATE statement used for each generalized-key index in the database
bin BYTE Internal representation of the generalized-key index

SYSROLEAUTH

The sysroleauth system catalog table describes the roles that are granted to users. It contains one row for each role that is granted to a user in the database. The sysroleauth system catalog table has the following columns.

Column Name Type Explanation
rolename NCHAR(32) Name of the role
grantee NCHAR(32) Grantee of role
is_grantable NCHAR(1) Specifies whether the role is grantable:
Y = Grantable
N = Not grantable

The rolename and grantee columns are indexed and allow only unique values. The is_grantable column indicates whether the role was granted with the WITH GRANT OPTION on the GRANT statement.

SYSROUTINELANGS

The sysroutinelangs system catalog table contains the supported languages for writing user-defined routines (UDRs).

Column Name Type Explanation
langid SERIAL Identifies the supported language
langname NCHAR(30) The name of the language, such as C or SPL
langinitfunc NVARCHAR(128) The name of the initialization function for the language
langpath NCHAR(255) The path for the UDR language
langclass NCHAR(18) The class of the UDR language

SYSSYNONYMS

Important: Version 4.0 or later Informix products no longer use this table; however, any syssynonyms entries made before Version 4.0 remain in this table. See the discussion of syssyntable.

The syssynonyms system catalog table lists the synonyms for each table or view. It contains a row for every synonym defined in the database. The syssynonyms system catalog table has the following columns.

Column Name Type Explanation
owner NCHAR(32) User name of owner
synname NVARCHAR(128) Synonym identifier
created DATE Date synonym created
tabid INTEGER Table identifier

A composite index for the owner and synonym columns allows only unique values. The tabid column is indexed and allows duplicate values.

SYSSYNTABLE

The syssyntable system catalog table outlines the mapping between each synonym and the object that it represents. It contains one row for each entry in the systables table that has a tabtype of S. The syssyntable system catalog table has the following columns.

Column Name Type Explanation
tabid INTEGER Table identifier
servername NVARCHAR(128) Server name
dbname NVARCHAR(128) Database name
owner NCHAR(32) User name of owner
tabname NVARCHAR(128) Name of table
btabid INTEGER Table identifier of base table or view

If you define a synonym for a table that is in your current database, only the tabid and btabid columns are used. If you define a synonym for a table that is external to your current database, the btabid column is not used, but the tabid, servername, dbname, owner, and tabname columns are used.

The tabid column maps to the tabid column in systables. With the tabid information, you can determine additional facts about the synonym from systables.

An index for the tabid column allows only unique values. The btabid column is indexed to allow duplicate values.

SYSTABAMDATA

The systabamdata system catalog table stores the parameterization option choices (table-specific hashing parameters) that you make when you create a table using a primary access method. It stores configuration parameters that determine how a primary access method accesses a particular table. The table might reside in a cooked file, a different database, or an sbspace within the database server.

The systabamdata system catalog table has the following columns.

Column Name Type Explanation
tabid INTEGER Table identifier
am_param NCHAR(256) Access method parameterization option choices
am_space NVARCHAR(128) The name of the space where the table data is stored

The tabid column, the key to the systables system catalog table, is indexed and must contain unique values. Each configuration parameter in the am_param list has the format keyword=value or keyword.

SYSTABAUTH

The systabauth system catalog table describes each set of privileges that are granted in a table. It contains one row for each set of table privileges that are granted in the database. The systabauth system catalog table has the following columns.

Column Name Type Explanation
grantor NCHAR(32) Grantor of privilege
grantee NCHAR(32) Grantee of privilege
tabid INTEGER Table identifier
tabauth NCHAR(9) 9-byte pattern that specifies table privileges:
s = Select
u = Update
* = Column-level privilege

i = Insert
d = Delete
x = Index
a = Alter
r = References
n = Under privilege
N = Under privilege with grant option

If the tabauth privilege code is uppercase (for example, S for select), a user who has this privilege can grant it to others. If the tabauth privilege code is lowercase (for example, s for select), the user who has this privilege cannot grant it to others.

A composite index for the tabid, grantor, and grantee columns allows only unique values. The composite index for the tabid and grantee columns allows duplicate values.

SYSTABLES

The systables system catalog table describes each table in the database. It contains one row for each table, view, or synonym that is defined in the database. The information in the systables system catalog table includes all database tables and the system catalog tables. The systables system catalog table has the following columns

Column Name Type Explanation
tabname NVARCHAR(128) Name of table, view, or synonym
owner NCHAR(32) Owner of table (user informix for system catalog tables and user name for database tables)
partnum INTEGER Physical location identifier
tabid SERIAL System-assigned sequential ID number (system tables: 1-24, user tables: 100-nnn)
rowsize SMALLINT Row size
ncols SMALLINT Number of columns
nindexes SMALLINT Number of indexes
nrows INTEGER Number of rows
created DATE Date created
version INTEGER Number that changes when table is altered
tabtype NCHAR(1) Table type:
T = Table
V = View
P = Private synonym
S = Public synonym (not available in an ANSI-compliant database)
locklevel NCHAR(1) Lock mode for a table:
B = Page
P = Page
R = Row
T = Table (Enterprise Decision Server only)
npused INTEGER Number of data pages in use
fextsize INTEGER Size of initial extent (in kilobytes)
nextsize INTEGER Size of all subsequent extents (in kilobytes)
flags SMALLINT Has a unique value for the following types of permanent tables:
ST_RAW represents a raw (nonlogging permanent) table in a logging database
RAW 0x00000002 (Enterprise Decision Server only)
STATIC 0x00000004 (Enterprise Decision Server only)
OPERATIONAL 0x00000010 (Enterprise Decision Server only)
STANDARD 0x00000020 (Enterprise Decision Server only)
EXTERNAL 0x00000020 (Enterprise Decision Server only)
site NVARCHAR(128) Reserved for future use (used to store database collation and C-type information)
dbname NVARCHAR(128) Reserved for future use
am_id INTEGER Access method ID (key to sysams table); null value or 0 indicates built-in storage manager used

Each table recorded in the systables system catalog table is assigned a tabid, which is a system-assigned sequential number that uniquely identifies each table in the database. The first tabid numbers up to 99 are reserved for system catalog tables. The user-created tabid numbers begin with 100.

The tabid column is indexed and must contain unique values. A composite index for the tabname and owner columns allows only unique values. The version column contains an encoded number that is put in the systables system catalog table when the table is created. Portions of the encoded value are incremented when data-definition statements, such as ALTER INDEX, ALTER TABLE, DROP INDEX, and CREATE INDEX, are performed.

When a prepared statement is executed, the version number is checked to make sure that nothing has changed since the statement was prepared. If the version number has changed, your statement does not execute, and you must prepare your statement again.

The npused column does not reflect BYTE or TEXT data used.

The systables system catalog table has two additional rows to store the database locale: GL_COLLATE with a tabid of 90 and GL_CTYPE with a tabid of 91. To view these rows, enter the following SELECT statement:

SYSTRACECLASSES

The systraceclasses system catalog table contains the names and identifiers of trace classes. A trace class is a category of trace messages that you can use in the development and testing of new DataBlade modules and user-defined routines. Developers use the tracing facility by calling the appropriate DataBlade API routines within their code.

To create a new trace class, insert a row directly into the systraceclasses system catalog table. By default, all users can view this table, but only users with the DBA privilege can modify it.

A unique index on the name column ensures that each trace class has a unique name. The database server also assigns each class a sequential identifier. Therefore, the index on the classid column also allows only unique values.

The systraceclasses system catalog table has the following columns.

Column Name Type Explanation
name NCHAR(18) Name of the class of trace messages
classid SERIAL Trace class identifier

SYSTRACEMSGS

The systracemsgs system catalog table stores internationalized trace messages that you can use in debugging user-defined routines. DataBlade module developers create a trace message by inserting a row directly into the systracemsgs system catalog table. Once a message is created, the development team can specify it either by name or by ID, using trace statements that the DataBlade API provides.

To create a trace message, you must specify its name, locale, and text. By default, all users can view the systracemsgs table, but only users with the DBA privilege can modify it.

The systracemsgs system catalog table has the following columns.

Column Name Type Explanation
name NVARCHAR(128) The name of the message
msgid SERIAL The message template identifier
locale NCHAR(36) The locale with which this version of the message is associated (for example, en_us.8859-1)
seqno Reserved for future use
message NVARCHAR(255) The message text

A unique index defined on columns name and locale. A unique index is also on the msgid column.

SYSTRIGBODY

The systrigbody system catalog table contains the English text of the trigger definition and the linearized code for the trigger. Linearized code is binary data and code that is represented in ASCII format.

Warning: The database server uses the linearized code that is stored in systrigbody. You must not alter the content of rows that contain linearized code.

The systrigbody system catalog table has the following columns.

Column Name Type Explanation
trigid INT Trigger identifier
datakey NCHAR Type of data:
D = English text for the header, trigger definition
A = English text for the body, triggered actions
H = Linearized code for the header
S = Linearized code for the symbol table
B = Linearized code for the body
seqno INT Sequence number
data NCHAR(256) English text or linearized code

A composite index for the trigid, datakey, and seqno columns allows only unique values.

SYSTRIGGERS

The systriggers system catalog table contains miscellaneous information about the SQL triggers in the database. This information includes the trigger event and the correlated reference specification for the trigger. The systriggers system catalog table has the following columns.

Column Name Type Explanation
trigid SERIAL Trigger identifier
trigname NVARCHAR(128) Trigger name
owner NCHAR(32) Owner of trigger
tabid INT ID of triggering table
event NCHAR Triggering event:
I = Insert trigger
U = Update trigger
D = Delete trigger
S = Select trigger
old NVARCHAR(128) Name of value before update
new NVARCHAR(128) Name of value after update
mode NCHAR Reserved for future use

A composite index for the trigname and owner columns allows only unique values. The trigid column is indexed and must contain unique values. An index for the tabid column allows duplicate values.

SYSUSERS

The sysusers system catalog table describes each set of privileges that are granted in the database. It contains one row for each user who has privileges in the database. The sysusers system catalog table has the following columns.

Column Name Type Explanation
username NCHAR(32) Name of the database user or role
usertype NCHAR(1) Specifies database-level privileges:
D = DBA (all privileges)
R = Resource (create permanent tables, user-defined data types, and indexes)
G = Role
C = Connect (work within existing tables)
priority SMALLINT Reserved for future use
password NCHAR(16 Reserved for future use

The username column is indexed and allows only unique values. The username can be the name of a role.

SYSVIEWS

The sysviews system catalog table describes each view that is defined in the database. Because the sysviews system catalog table stores the SELECT statement that you use to create the view, it can contain multiple rows for each view in the database. The sysviews system catalog table has the following columns

Column Name Type Explanation
tabid INTEGER Table identifier
seqno SMALLINT Line number of the SELECT statement
viewtext NCHAR(64) Actual SELECT statement used to create the view
.

A composite index for the tabid and seqno columns allows only unique values.

SYSVIOLATIONS

The sysviolations system catalog table stores information about the constraint violations for base tables. Every table in the database that has a violations table and a diagnostics table associated with it has a corresponding row in the sysviolations table. The sysviolations system catalog table has the following columns.

Column Name Type Explanation
targettid INTEGER Table identifier of the target table. The target table is the base table on which the violations table and the diagnostic table are defined.
viotid INTEGER Table identifier of the violations table
diatid INTEGER Table identifier of the diagnostics table
maxrows INTEGER Maximum number of rows that can be inserted in the diagnostics table during a single insert, update, or delete operation on a target table that has a filtering mode object defined on it.
Also signifies the maximum number of rows that can be inserted in the diagnostics table during a single operation that enables a disabled object or sets a disabled object to filtering mode (provided that a diagnostics table exists for the target table).
For Enterprise Decision Server, indicates the maximum number of rows that are allowed in the violations table for each coserver.
If no maximum is specified for the diagnostics or violations table, this column contains a null value.

The primary key of the sysviolations table is the targettid column. Unique indexes are also defined on the viotid and diatid columns.

Enterprise Decision Server does not use the diagnostic table when a constraint violation occurs. Rather, the database server stores additional information in the violations table. The violations table contains the data that the transaction refused and an indication of the cause.

SYSXTDDESC

The sysxtddesc system catalog table provides a text description of each user-defined data type (opaque, distinct, and complex (named row types, unnamed row types, and collection types)) that you define in the database. The sysxtddesc system catalog table has the following columns.

Column Name Type Explanation
extended_id SERIAL Unique identifier for extended data types
seqno SMALLINT Value to order and identify one line of description for specific values of extended_id. A new sequence is created only if the text string is larger than the 255 limit of the text string.
description NCHAR(256) Textual description of the extended data type

SYSXTDTYPEAUTH

The sysxtdtypeauth system catalog table provides privileges for each user-defined data type (opaque and distinct) and for each named row type that you define in the database. The table contains one row for each set of privileges granted.

The sysxtdtypeauth system catalog table has the following columns.

Column Name Type Explanation
grantor NCHAR(32) Grantor of privilege
grantee NCHAR(32) Grantee of privilege
type INTEGER Identifier of the user-defined type
auth NCHAR(2) Privileges on the user-defined data type:
n = Under privilege
N = Under privilege with grant option
u = Usage privilege
U = Usage privilege with grant option

If the sysxtdtypeauth privilege code is uppercase (for example, 'U' for usage), a user who has this privilege can also grant it to others. If the sysxtdtypeauth privilege code is lowercase (for example, 'u' for usage), the user who has this privilege cannot grant it to others.

A composite index for the type, grantor, and grantee columns allows only unique values. The composite index for the type and grantee columns allows duplicate values.

SYSXTDTYPES

The sysxtdtype system catalog table has an entry for each user-defined data type (opaque and distinct data types) and complex data type (named row type, unnamed row type, and collection type) that is defined in the database. Each extended data type has a unique id, called an extended id (extended_id), a data type identifier (type), and the length and description of the data type.

The sysxtdtypes system catalog table has the following columns.

Column Name Type Explanation
extended_id SERIAL Unique identifier for extended data types
mode NCHAR(1) Detailed description of the user-defined type. One of the following values:
B = Base (opaque)
C = Collection type as well as unnamed row type
D = Distinct
R = Named row type
' ' (blank) = Built-in type
owner NCHAR(32) Owner of the data type
name NVARCHAR(128) Name of the data type
type SMALLINT The identifier of the data type. See the coltype column values of the syscolumns system catalog table for a complete list of identifiers associated with different data types. For distinct types created from built-in data types, the value in this column corresponds with the value of the coltype column (indicating the source type) in the syscolumns system catalog table. A value of 40 indicates a distinct data type created from a variable-length opaque type. A value of 41 indicates a distinct type created from a fixed-length opaque type.
source INTEGER The sysxtdtypes reference for this type, if it is a distinct type. A value of 0 indicates that the distinct type was created from a built-in data type.
maxlen INTEGER The maximum length for variable-length data types. A value of 0 indicates a fixed-length data type.
length INTEGER The length in bytes for fixed-length data types. A value of 0 indicates a variable-length data type.
byvalue NCHAR(1) If the data type is passed by value
'T' = type is passed by value
'F' = type is not passed by value
cannothash NCHAR(1) Is data type hashable using the default bit-hashing function?
'T' = type is hashable
'F' = type is not hashable
align SMALLINT Alignment for this data type.
One of the following values: 1, 2, 4, 8.
locator INTEGER Locator (key) for unnamed row types.

The index on the extended_id column allows only unique values. Similarly the index on columns name and type columns also allows only unique values. The index on the source and maxlen columns allow duplicate values.


Informix Guide to SQL: Reference, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved