INFORMIX
Informix Guide to SQL: Reference
Chapter 1: System Catalog
Home Contents Index Master Index New Book

Structure of the System Catalog

The following system catalog tables describe the structure a database on an Informix database server.
sysams

sysfragments

syssynonyms

sysattrtypes

sysindices

syssyntable

sysblobs

sysinherits

systabauth

syscasts

syslangauth

systables

syschecks

syslogmap

systraceclasses

syscolattribs

sysobjstate

systracemsgs

syscolauth

sysopclasses

systrigbody

syscoldepend

sysopclstr

systriggers

syscolumns

sysprocauth

sysusers

sysconstraints

sysprocbody

sysviews

sysdefaults

sysprocedures

sysviolations

sysdepend

sysprocplan

sysxtddesc

sysdistrib

sysreferences

sysxtdtypeauth

syserrors

sysroleauth

sysxtdtypes

sysfragauth

sysroutinelangs

Do not confuse the system catalog tables of a database with the tables in the sysmaster database of Universal Server. The system catalog tables give information regarding a particular database on any Informix database server, while the sysmaster tables contain information about an entire Informix database server, which might manage many individual databases. The information in the sysmaster tables is primarily useful for Universal Server DBAs. For more information about the sysmaster tables, see the INFORMIX-Universal Server Administrator's Guide.

GLS
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 (including the default locale), all character information in the system catalog tables is stored in CHAR columns.

This manual assumes that the locale has code-set collation and lists character columns with the CHAR data type. If your locale has localized collation, these character columns are NCHAR. For more information on collation orders, see Chapter 1 of the Guide to GLS Functionality. For information about NCHAR and CHAR data types, see Chapter 3 of the Guide to GLS Functionality and Chapter 2 of this guide.

SYSAMS

The sysams system catalog table shows information needed to use built-in access methods as well as those created by the Create Access Method SQL statement described in the Virtual-Table Interface Programmer's Manual. The sysams table shows the following columns.

(1 of 5)

Column Name Type Explanation

am_name

CHAR(18)

Name of the access method

am_owner

CHAR(8)

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

CHAR(1)

Type of access method:

'P ' = Primary

'S' = Secondary

am_sptype

CHAR(3)

Type of space in which the access method can live:

'D' = dbspace

'X' = extspace

'S' = sbspace (smart-large-object space)

'A' = any space

am_defopclass

INTEGER

Default-operator class identifier. This is 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

This 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

This 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

This 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

This 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

This 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

This 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

This 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

This 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

This 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

This 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

This 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

This 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

This 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

This 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

This is the procid listed for the routine in the sysprocedures system catalog tables

am_build

Reserved for future use

For information regarding access method functions, see the Virtual-Table Interface Programmer's Manual.

The composite index for the am_name and am_owner columns in this table allows only unique values.

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 shows 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

CHAR(18)

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. See the coltype column entries in the syscolumns system catalog table for a complete list of values associated with different data types.

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 sysblobs system catalog table specifies the storage location of a simple large object, namely TEXT and BYTE. The name, sysblobs, is used for historical reasons, even though the table describes simple large objects. It contains one row for each TEXT or BYTE column in a table. The sysblobs system catalog table shows the following columns.

Column Name Type Explanation

spacename

CHAR(18)

Blobspace, dbspace, or family name (for optical storage)

type

CHAR(1)

Media type:

'M' = Magnetic

'O' = Optical

tabid

INTEGER

Table identifier

colno

SMALLINT

Column number

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

For information about location and size of chunks of blobspaces, dbspaces, and sbspaces locations of TEXT, BYTE, BLOB, and CLOB columns, see the syschunks sysmaster table in INFORMIX-Universal Server Administrator's Guide.

SYSCASTS

The syscasts system catalog table describes the casts in the database. It contains one row for each system-defined cast and one row for each implicit or explicit cast defined by a user. The syscasts system catalog table shows the following columns.

Column Name Type Explanation

owner

CHAR(8)

Owner of cast (user informix for system-defined 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

CHAR(18)

Function or procedure used to implement the cast (may 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

CHAR(8)

User name of the owner of the function or procedure named in the routine_name column

class

CHAR

Type of cast:

'I' = Implicit cast

'S' = System-defined cast

'X' = Explicit 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 text and a binary-encoded form of the check constraint, it contains multiple rows for each check constraint. The syschecks system catalog table shows the following columns.

Column Name Type Explanation

constrid

INTEGER

Constraint identifier

type

CHAR(1)

Form in which the check constraint is stored:

'B' = Binary encoded

'T' = Text

seqno

SMALLINT

Line number of the check constraint

checktext

CHAR(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 shows the following columns.

(1 of 2)

Column Name Type Explanation

tabid

INTEGER

Table identifier

colno

SMALLINT

Column number

extentsize

INTEGER

Pages in smart-large-object extent, either expressed in kbytes or in multiples of sbspace page size

flags

INTEGER

This is 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 large-object column by a user.

LO_NOKEEP_LASTACCESS_TIME

No record is kept of the most recent access of this large-object column by a user.

HI_INTEG

Data pages have headers and footers to detect incomplete writes and data corruption.

MODERATE_INTEG

Data pages do not have headers and footers.

flags1

INTEGER

Reserved for future use

sbspace

CHAR(18)

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 shows the following columns.

Column Name Type Explanation

grantor

CHAR(8)

Grantor of privilege

grantee

CHAR(8)

Grantee (receiver) of privilege

tabid

INTEGER

Table identifier

colno

SMALLINT

Column number

colauth

CHAR(3)

3-byte pattern that specifies column privileges:

's' or `S' = Select

'u' or `U' = Update

'r' or `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 shows 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. The syscolumns system catalog table shows the following columns.

(1 of 3)

Column Name Type Explanation

colname

CHAR(18)

Column name

tabid

INTEGER

Table identifier

colno

SMALLINT

Column number sequentially assigned by the system (from left to right within each table)

coltype

SMALLINT

Code (identifier) 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

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-smallest value

colmax

INTEGER

Second-largest 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.

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

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

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:

  • How the coltype and collength columns encode the type and length values, respectively, for certain data types.
  • How the colmin and colmax columns store column values.

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:
BLOB

BOOLEAN

CLOB

LVARCHAR

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:

  • If the collength value is positive: collength = (min_space * 256) + max_size

  • If the collength value is negative: collength + 65536 = (min_space * 256) + max_size

GLS
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 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 shown in the following table.

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-l rowspan=1>

Reserved for future use

langinitfunc

Reserved for future use

SYSSYNONYMS

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 shows the following columns.

Column Name Type Explanation

owner

CHAR(8)

User name of owner

synname

CHAR(18)

Synonym identifier

created

DATE

Date synonym created

tabid

INTEGER

Table identifier

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

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

SYSSYNTABLE

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

Column Name Type Explanation

tabid

INTEGER

Table identifier

servername

CHAR(18)

Server name

dbname

CHAR(18)

Database name

owner

CHAR(8)

User name of owner

tabname

CHAR(18)

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.

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 shows the following columns.

Column Name Type Explanation

grantor

CHAR(8)

Grantor of privilege

grantee

CHAR(8)

Grantee (receiver) of privilege

tabid

INTEGER

Table identifier

tabauth

CHAR(8)

8-byte pattern that specifies table privileges. Upper case letters indicate permission to grantee to grant that privilege to others:

's' or 'S' = Select

'u' or 'U' = Update

'*' = Column-level authority

'i' or 'I'= Insert

'd' or 'D' = Delete

'x' or 'X' = Index

'a' or 'A' = Alter

'r' or 'R' = References

If the tabauth privilege code is uppercase (for example, S for select), a user who has this privilege also 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. This includes all database tables and the system catalog tables. The systables system catalog table shows the following columns.

(1 of 2)

Column Name Type Explanation

tabname

CHAR(18)

Name of table, view, or synonym

owner

CHAR(8)

Owner of table (user informix for system catalog tables and user name for database tables)

partnum

INTEGER

Tblspace identifier (similar to tabid)

tabid

SERIAL

System-assigned sequential ID number (system tables: 1 through 24, user tables: 100 through 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

CHAR(1)

Table type:

'T' = Table

'V' = View

'P' = Private synonym

'P' = Synonym (in an ANSI-compliant database)

'S' = Synonym

locklevel

CHAR(1)

Lock mode for a table:

'B' = Page

'P' = Page

'R' = Row

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

Reserved for future use

site

Reserved for future use (used to store database collation and C type information)

dbname

Reserved for future use

type_xid

INTEGER

Data type of table, if the table is a typed table

am_id

INTEGER

Access method identifier. A primary access method can be specified when the table is created. A value of null or zero indicates that the built-in storage manager is being used.

This is the am_id in the sysams system catalog
table.

Each table recorded in the systables system catalog table is assigned a tabid, a system-assigned sequential ID number that uniquely identifies each table in the database. The first tabid numbers up to 99 are reserved for system catalog tables, and the user-created tables receive tabid numbers beginning 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 into 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 blob data used. The tabid column is indexed and must contain unique values. A composite index for the tabname and owner columns allows only unique values.

GLS
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. Enter the following SELECT statement to view these rows:

SYSTRACECLASSES

The systraceclasses system catalog table contains the names and identifiers of trace classes. A trace class is a category of trace messages that may be used 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 shows the following columns.
Column Name Type Explanation

name

CHAR(18)

Name of the class of trace messages

classid

SERIAL

Trace class identifier

SYSTRACEMSGS

The systracemsgs system catalog table stores internationalized trace messages that may be used in the debugging of 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 provided by the DataBlade API.

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 shows the following columns.
Column Name Type Explanation

name

CHAR(18)

The name of the message

msgid

SERIAL

The message template identifier

locale

CHAR(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 text 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 shows the following columns.

Column Name Type Explanation

trigid

INTEGER

Trigger identifier

datakey

CHAR

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

INTEGER

Sequence number

data

CHAR(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 shows the following columns.

Column Name Type Explanation

trigid

SERIAL

Trigger identifier

trigname

CHAR(18)

Trigger name

owner

CHAR(8)

Owner of trigger

tabid

INT

Identifier of the triggering table

event

CHAR(1)

Triggering event:

'I' = Insert trigger

'U' = Update trigger

'D' = Delete trigger

old

CHAR(18)

Name of value before update

new

CHAR(18)

Name of value after update

mode

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 shows the following columns.

Column Name Type Explanation

username

CHAR(8)

Name of the database user or role

usertype

CHAR(1)

Specifies database-level privileges:

'D' = DBA (all privileges)

'R' = Resource (create user-defined data types and permanent tables and indexes)

'G' = Role

'C' = Connect (work within existing tables)

priority

Reserved for future use

password

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 into the database. The sysviews system catalog table shows the following columns.

Column Name Type Explanation

tabid

INTEGER

Table identifier

seqno

SMALLINT

Line number of the SELECT statement

viewtext

CHAR(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 violations and diagnostics tables for base tables. Every table in the database that has a violations and diagnostics table associated with it has a corresponding row in the sysviolations table. The sysviolations system catalog table shows the following columns.

(1 of 2)

Column Name Type Explanation

targettid

INTEGER

Table identifier of the target table. The target table is the base table on which the violations and diagnostics tables 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 into 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 into 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).

If no maximum has been specified for the diagnostics 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.

SYSXTDDESC

The sysxtddesc system catalog table provides a text description of each user-defined data type (collection, opaque, distinct, and row types) that is defined in the database. The sysxtddesc system catalog table shows 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

CHAR(255)

Textual description of the extended data type

SYSXTDTYPEAUTH

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

The sysxtdtypeauth system catalog table shows the following columns.

Column Name Type Explanation

grantor

CHAR(8)

Grantor of privilege

grantee

CHAR(8)

Grantee (receiver) of privilege

type

INTEGER

Identifier of the user-defined type

auth

CHAR(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 shows the following columns.

(1 of 2)

Column Name Type Explanation

extended_id

SERIAL

Unique identifier for extended data types

mode

CHAR(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

CHAR(8)

Owner of the data type

name

CHAR(18)

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, this is the value of the coltype column of 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 distinct 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

CHAR(1)

If the data type is passed by value

'T' = type is passed by value
'F' = type is not passed by value

cannothash

CHAR(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.1
Copyright © 1998, Informix Software, Inc. All rights reserved.