The mi_tab_partnum() accessor function

The mi_tab_partnum() function retrieves the fragment identifier for the table.

Syntax

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

Usage

If a CREATE TABLE or ALTER FRAGMENT statement specifies fragmentation, use this function to determine the current fragment identifier (also called a partition number). Each fragment occupies one named sbspace or extspace.

Return values

The integer specifies physical address of the fragment. If the table is not fragmented, the return value corresponds to the partnum value for this table in the systables system catalog table.

For a fragmented table, the return value corresponds to the fragment identifier and the partn value in the sysfragments system catalog table.