Purpose Option: |--+-purpose function--=--function name--+----------------------| +-purpose value--=--+-string value--+-+ | '-numeric value-' | '-purpose flag------------------------'
Element | Purpose | Restrictions | Syntax |
---|---|---|---|
purpose function | A keyword that specifies a task and the corresponding access-method function | The interface specifies the predefined purpose-function keywords to which you can assign UDR names. You cannot name a UDR with the same name as the keyword. | Function purpose category; see Table 11. |
purpose value | A keyword that identifies configuration information | The interface specifies the predefined configuration keywords to which you can assign values. | Value purpose category; see Table 11. |
purpose flag | A keyword that indicates which feature a flag enables | The interface specifies flag names. | Flag purpose category; see Table 11. |
function
name |
The user-defined function that performs the tasks of the specified purpose function | A CREATE FUNCTION statement must register the function in the database. | Database Object Name segment; see IBM Informix: Guide to SQL Syntax. |
string value | An indicator that is expressed as one or more characters | None | Quoted String segment; see IBM Informix: Guide to SQL Syntax. |
numeric value | A value that can be used in computations | None | A numeric literal. |
Each purpose-name keyword corresponds to a column name in the sysams system catalog table. The database server uses the following types of purpose attributes:
A purpose-function attribute maps the name of a user-defined function to one of the prototype purpose functions that Table 4 describes.
Each flag indicates whether an access method supports a particular SQL statement or keyword.
These string, character, or numeric values provide configuration information that a flag cannot supply.
You specify purpose options when you create an access method with the CREATE PRIMARY ACCESS_METHOD statement. To change the purpose options of an access method, use the ALTER ACCESS_METHOD statement.
For example, Figure 30 sets the am_getnext purpose-function name to the UDR name textfile_getnext. This example creates a new access method.
The example in Figure 29 adds a purpose function to an existing access method.
To enable a purpose flag, specify the purpose name without a corresponding value.
To clear a purpose-option setting in the sysams system catalog table, use the DROP clause of the ALTER ACCESS_METHOD statement.
Table 11 describes the possible settings for the sysams columns that contain purpose-function names, purpose flags, and purpose values. The items in Table 11 appear in the same order as the corresponding sysams columns.
The following rules apply to the purpose-option specifications in the CREATE PRIMARY ACCESS_METHOD and ALTER ACCESS_METHOD statements:
The ALTER ACCESS_METHOD statement cannot drop am_getnext but can modify it.
In this manual, see the following topics:
In the IBM Informix: Guide to SQL Syntax, see the descriptions of: