The send and receive support functions can call functions
to convert data of the atomic C data types within the internal (binary)
representation of an opaque data type.
The following tables show the functions
that can convert a difference in alignment or byte order between the
client computer and the server computer.
Table 1. Type-transfer functions of the byte
data
| Data type |
In send support function |
In receive support function |
| Byte data |
mi_put_bytes() |
mi_get_bytes() |
Table 2. Type-transfer functions of the date
and date/time data
| Date and Date/time data |
In send support function |
In receive support function |
| DATE data |
mi_put_date() |
mi_get_date() |
| DATETIME data |
mi_put_datetime() |
mi_get_datetime() |
| INTERVAL data |
mi_put_interval() |
mi_get_interval() |
Table 3. Type-transfer functions of the Integer
data
| Integer data |
In send support function |
In receive support function |
| SMALLINT data (two-byte integers) |
mi_put_smallint(), mi_fix_smallint() |
mi_get_smallint(), mi_fix_smallint() |
| INTEGER data (four-byte integers) |
mi_put_integer(), mi_fix_integer() |
mi_get_integer(), mi_fix_integer() |
| INT8 data (eight-byte integers) |
mi_put_int8() |
mi_get_int8() |
Table 4. Type-transfer functions of the fixed-point
and floating-point data
| Fixed-point and Floating-point data |
In send support function |
In receive support function |
| DECIMAL data (fixed-point and floating-point) |
mi_put_decimal() |
mi_get_decimal() |
| MONEY data |
mi_put_money() |
mi_get_money() |
| SMALLFLOAT data |
mi_put_real() |
mi_get_real() |
| FLOAT data |
mi_put_double_precision() |
mi_get_double_precision() |
Table 5. Type-transfer functions of the other
data
| Other data |
In send support function |
In receive support function |
| Character data |
mi_put_string() |
mi_get_string() |
| LO handle (smart large objects) |
mi_put_lo_handle() |
mi_get_lo_handle() |
Characters have the same binary representation on all
architectures, so they do not need to be converted. However, if the
code sets of the server-processing locale (in which the UDR executes)
and the client locale differ, the mi_get_string() and mi_put_string() functions
automatically perform the appropriate code-set conversion (provided
that the two code sets are compatible). For more information about
how to internationalize a C UDR, see Internationalization of modules (GLS).