Home | Previous Page | Next Page   DataBlade API Overview > Accessing SQL Data Types > Boolean Data Types >

Pointer Data Types (Server)

The SQL POINTER data type is the SQL equivalent of a generic pointer. This data type is used in the routine registration of a UDR to indicate that some data type has no equivalent SQL data type. The DataBlade API represents the POINTER data type with the mi_pointer data type.

Use the mi_pointer data type only for communications between UDRs. The POINTER data type is a predefined opaque type (an opaque data type that Informix defines). However, no opaque-type support functions for this data type are included.

Important:
Because the POINTER data type does not include opaque-type support functions, you cannot pass this type between the database server and a client application. Also, do not define columns to be of type POINTER.

The mi_pointer data type is guaranteed to be the size of the C type void * on all computer architectures. The C type void * is usually equivalent to a long type, which is usually four bytes in length.

64-bit

On 64-bit platforms, void * is eight bytes in length, so mi_pointer is also eight bytes.

End of 64-bit

An mi_pointer value can fit into an MI_DATUM structure and can be passed by value to and from C UDRs. Keep in mind that because mi_pointer actually contains an address to a value, passing an mi_pointer by value is actually the same as passing the value to which mi_pointer points by reference.

Important:
When you use mi_pointer, make sure that the value that the mi_pointer references is allocated with a memory duration appropriate to the use of the value. For more information, see Choosing the Memory Duration.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]