The am_create purpose function

The database server calls am_create to process a CREATE TABLE statement.

Syntax

mi_integer am_create(MI_AM_TABLE_DESC *tableDesc)
tableDesc
Points to the table descriptor.

Usage

Even if the access method does not provide an am_create function, the database server automatically adds the created object to the system catalog tables, such as systables. For example, a user might issue the CREATE TABLE command to register a table in another database of the same database server instance.

The am_create function typically:
  • Calls accessor functions to extract table specifications from the table descriptor, including a pointer to the row descriptor
  • Calls DataBlade® API functions to extract column attributes from the row descriptor
  • Verifies that the access method can provide all the requirements that the CREATE TABLE specifies
  • Calls the appropriate DataBlade API functions to create a smart large object or interact with the operating system for file creation, as described in Manage storage spaces
Important: By default, transaction logging is disabled in sbspaces. To find out how to turn on logging, see Ensure data integrity.

Return values

MI_OK
Indicates success.
MI_ERROR
Indicates failure.

Related topics

In the Informix® DataBlade API Programmer's Guide, see the descriptions of:
  • DataBlade API functions, such as mi_lo_create(), and create-time constants
  • DataBlade API accessor functions for the row descriptor