Data Types for PostgreSQL
Data Type Definition
Keyword 1
|
|
|
|
|
|
Large signed, exact
whole number. OR Signed eight-byte integer.
|
|
|
|
Autoincrementing eight-byte
integer.
|
|
|
|
|
|
|
|
Variable-length bit
string.
|
|
|
|
Logical Boolean (true/false).
|
|
|
|
Rectangular box on a
plane.
|
|
|
|
Binary data (byte array).
|
|
|
|
Fixed-length character
string.
|
|
|
|
IPv4 or IPv6 network
address.
|
|
|
|
|
|
|
|
|
|
|
|
Signed, fixed-point
decimal number.
|
|
|
|
Signed, double precision,
floating-point number.
|
|
|
|
Signed, single precision
or double precision, floating-point number.
|
|
|
|
IPv4 or IPv6 host address.
|
|
|
|
Regular signed, exact
whole number.
|
|
|
|
|
|
|
|
Infinite line on a plane.
|
|
|
|
|
|
|
|
Media Access Control
address.
|
|
|
|
|
|
|
|
Geometric path on a
plane.
|
|
|
|
Geometric point on a
plane.
|
|
|
|
Closed geometric path
on a plane.
|
|
|
|
Signed, single precision
floating-point number.
|
|
|
|
Autoincrementing four-byte
integer.
|
|
|
|
Small signed, exact
whole number.
|
|
|
|
Autoincrementing two-byte
integer.
|
|
|
|
Variable-length character
string.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
User-level transaction
ID snapshot.
|
|
|
|
Universally unique identifier.
|
|
|
|
Varying-length character
string.
|
|
|
|
|
|
1The CT_PRESERVE= connection
argument, which controls how data types are mapped, can affect whether
a data type can be defined. The values FORCE (default) and FORCE_COL_SIZE
do not affect whether a data type can be defined. The values STRICT
and SAFE can result in an error if the requested data type is not
native to the data source, or the specified precision or scale is
not within the data source range.
|
2The PostgreSQL data type
cannot be defined, and when data is retrieved, the native data type
is mapped to a similar data type.
|