type_info (NEW )
@type_info = $dbh->type_info($data_type);
Warning: This method is experimental and may change.
list of hash references holding information about one or more
$data_type. The list is ordered by
DATA_TYPE first and then by how closely each type
maps to the corresponding ODBC SQL datatype, closest first. If called
in a scalar context then only the first (best) element is returned.
$data_type is undefined or
SQL_ALL_TYPES, then the list will contain hashes
for all datatype variants supported by the database and driver.
$data_type is an array reference, then
type_info returns the information for the
first type in the array that has any matches.
The keys of the hash follow the same letter case conventions as the rest of the DBI (see "Naming Conventions and Name Space”). The following items should exist:
Datatype name for use in
TABLE statements, etc.
SQL datatype number.
For numeric types, this is either the total number of digits (if the
NUM_PREC_RADIX value is
the total number of bits allowed in the column (if
For string types, this is the maximum size of the string in bytes.
For date and interval types, this is the maximum number of characters needed to display the value.
Characters used to prefix a literal. A typical prefix is
'" for characters, or possibly
0x" for binary values passed as
hexadecimal. NULL (