This structure is used to store partitioning information, such as the
partitioning map and the partitioning key of a table.
Table 79. Fields in the SQLUPI Structure
Field Name | Data Type | Description |
---|---|---|
PMAPLEN | INTEGER | The length of the partitioning map in bytes. For a single-node table, the value is sizeof(SQL_PDB_NODE_TYPE). For a mult-inode table, the value is SQL_PDB_MAP_SIZE * sizeof(SQL_PDB_NODE_TYPE). |
PMAP | SQL_PDB_NODE_TYPE | The partitioning map. |
SQLD | INTEGER | The number of used SQLPARTKEY elements; that is, the number of key parts in a partitioning key. |
SQLPARTKEY | Structure | The description of a partitioning column in a partitioning key. The maximum number of partitioning columns is SQL_MAX_NUM_PART_KEYS. |
Table 80 shows the SQL data types and lengths for the SQLUPI data
structure. The SQLTYPE column specifies the numeric value that
represents the data type of an item.
Table 80. SQL Data Types and Lengths for the SQLUPI Structure
Data type | SQLTYPE (Nulls Not Allowed) | SQLTYPE (Nulls Allowed) | SQLLEN | AIX |
---|---|---|---|---|
Date | 384 | 385 | Ignored | Yes |
Time | 388 | 389 | Ignored | Yes |
Timestamp | 392 | 393 | Ignored | Yes |
Variable-length character string | 448 | 449 | Length of the string | Yes |
Fixed-length character string | 452 | 453 | Length of the string | Yes |
Long character string | 456 | 457 | Ignored | No |
Null-terminated character string | 460 | 461 | Length of the string | Yes |
Floating point | 480 | 481 | Ignored | Yes |
Decimal | 484 | 485 | Byte 1 = precision Byte 2 = scale | Yes |
Large integer | 496 | 497 | Ignored | Yes |
Small integer | 500 | 501 | Ignored | Yes |
Variable-length graphic string | 464 | 465 | Length in double-byte characters | Yes |
Fixed-length graphic string | 468 | 469 | Length in double-byte characters | Yes |
Long graphic string | 472 | 473 | Ignored | No |
Language Syntax
C Structure
/* File: sqlutil.h */ /* Structure: SQLUPI */ /* ... */ SQL_STRUCTURE sqlupi { unsigned short pmaplen; SQL_PDB_NODE_TYPE pmap[SQL_PDB_MAP_SIZE]; unsigned short sqld; struct sqlpartkey sqlpartkey[SQL_MAX_NUM_PART_KEYS]; }; /* ... */ |
/* File: sqlutil.h */ /* Structure: SQLPARTKEY */ /* ... */ SQL_STRUCTURE sqlpartkey { unsigned short sqltype; unsigned short sqllen; }; /* ... */ |