Data Types
Version coverage matrixDefinitions for PostgreSQL 18
Reading PG 18·Select a recorded version
single-byte internal type
PostgreSQL allows columns of a table to be defined as variable-length multidimensional arrays. Arrays of any built-in or user-defined base type, enum type, composite type, range type, or domain can be created.
A composite type represents the structure of a row or record; it is essentially just a list of field names and their data types. PostgreSQL allows composite types to be used in many of the same ways that simple types can be used. For example, a column of a table can be declared to be of a composite type.
A domain is a user-defined data type that is based on another underlying type . Optionally, it can have constraints that restrict its valid values to a subset of what the underlying type would allow. Otherwise it behaves like the underlying type — for example, any operator or function that can be applied to the underlying type will work on the domain type. The underlying type can be any built-in or user-defined base type, enum type, array type, composite type, range type, or another domain.
Enumerated (enum) types are data types that comprise a static, ordered set of values. They are equivalent to the enum types supported in a number of programming languages. An example of an enum type might be the days of the week, or a set of status values for a piece of data.
access control list
Indicates that a function accepts any input data type.
Indicates that a function accepts any array data type (see Section 36.2.5 ).
Indicates that a function accepts any data type, with automatic promotion of multiple arguments to a common data type (see Section 36.2.5 ).
Indicates that a function accepts any array data type, with automatic promotion of multiple arguments to a common data type (see Section 36.2.5 ).
Indicates that a function accepts any multirange data type, with automatic promotion of multiple arguments to a common data type (see Section 36.2.5 and Section 8.17 ).
Indicates that a function accepts any non-array data type, with automatic promotion of multiple arguments to a common data type (see Section 36.2.5 ).
Indicates that a function accepts any range data type, with automatic promotion of multiple arguments to a common data type (see Section 36.2.5 and Section 8.17 ).
Indicates that a function accepts any data type (see Section 36.2.5 ).
Indicates that a function accepts any enum data type (see Section 36.2.5 and Section 8.7 ).
Indicates that a function accepts any multirange data type (see Section 36.2.5 and Section 8.17 ).
Indicates that a function accepts any non-array data type (see Section 36.2.5 ).
Indicates that a function accepts any range data type (see Section 36.2.5 and Section 8.17 ).
signed eight-byte integer
autoincrementing eight-byte integer
fixed-length bit string
variable-length bit string
logical Boolean (true/false)
rectangular box on a plane
binary data ( “ byte array ” )
fixed-length character string
variable-length character string
command identifier type, sequence in transaction id
IPv4 or IPv6 network address
circle on a plane
Indicates that a function accepts or returns a null-terminated C string.
calendar date (year, month, day)
multirange of dates
range of dates
double precision floating-point number (8 bytes)
An event trigger function is declared to return event_trigger.
A foreign-data wrapper handler is declared to return fdw_handler .
GiST index internal text representation for text search
An index access method handler is declared to return index_am_handler .
IPv4 or IPv6 host address
array of int2, used in system tables
multirange of integers
range of integers
multirange of bigints
range of bigints
signed four-byte integer
Indicates that a function accepts or returns a server-internal data type.
time span
textual JSON data
binary JSON data, decomposed
JSON path
A procedural language call handler is declared to return language_handler .
infinite line on a plane
line segment on a plane
MAC (Media Access Control) address
MAC (Media Access Control) address (EUI-64 format)
currency amount
internal type for object names
exact numeric of selectable precision
multirange of numerics
range of numerics
numeric object identifier
array of oids, used in system tables
geometric path on a plane
pseudo-type representing BRIN bloom summary
pseudo-type representing BRIN minmax-multi summary
Identifies a representation of DDL commands that is available to event triggers.
multivariate dependencies
PostgreSQL Log Sequence Number
multivariate MCV list
multivariate ndistinct coefficients
string representing an internal node tree
user-level transaction ID snapshot
geometric point on a plane
closed geometric path on a plane
single precision floating-point number (4 bytes)
Identifies a function taking or returning an unspecified row type.
reference to cursor (portal name)
relation name
collation name
text search configuration
text search dictionary
namespace name
operator name
operator with argument types
function name
function with argument types
role name
data type name
autoincrementing four-byte integer
signed two-byte integer
autoincrementing two-byte integer
A table access method handler is declared to return table_am_handler .
variable-length character string
tuple physical location, format '(block,offset)'
time of day, including time zone
time of day (no time zone)
date and time, including time zone
date and time (no time zone)
A trigger function is declared to return trigger.
A tablesample method handler is declared to return tsm_handler .
multirange of timestamps without time zone
text search query
range of timestamps without time zone
multirange of timestamps with time zone
range of timestamps with time zone
text search document
user-level transaction ID snapshot (deprecated; see pg_snapshot )
Identifies a not-yet-resolved type, e.g., of an undecorated string literal.
universally unique identifier
Indicates that a function returns no value.
transaction id
full transaction id
XML data