Wiki / Data Types
Data Types
PostgreSQL data types, aliases, representations and versioned definitions, with links to operators and index support.
Reading PostgreSQL 18.6.
121 entries; 114 recorded in PostgreSQL 18.6.
-
bit Bit strings
fixed-length bit string
-
bit varying Bit strings
variable-length bit string
-
boolean Boolean
logical Boolean (true/false)
-
"char" Character strings
single-byte internal type
-
character Character strings
fixed-length character string
-
character varying Character strings
variable-length character string
-
name Character strings
internal type for object names
-
pg_brin_bloom_summary Character strings
pseudo-type representing BRIN bloom summary
-
pg_brin_minmax_multi_summary Character strings
pseudo-type representing BRIN minmax-multi summary
-
pg_dependencies Character strings
multivariate dependencies
-
pg_mcv_list Character strings
multivariate MCV list
-
pg_ndistinct Character strings
multivariate ndistinct coefficients
-
pg_node_tree Character strings
string representing an internal node tree
-
text Character strings
variable-length character string
-
Not recorded in the selected version.
-
date Date and time
calendar date (year, month, day)
-
interval Date and time
time span
-
Not recorded in the selected version.
-
time with time zone Date and time
time of day, including time zone
-
time without time zone Date and time
time of day (no time zone)
-
timestamp with time zone Date and time
date and time, including time zone
-
timestamp without time zone Date and time
date and time (no time zone)
-
Not recorded in the selected version.
-
box Geometric
rectangular box on a plane
-
circle Geometric
circle on a plane
-
line Geometric
infinite line on a plane
-
lseg Geometric
line segment on a plane
-
path Geometric
geometric path on a plane
-
point Geometric
geometric point on a plane
-
polygon Geometric
closed geometric path on a plane
-
int2vector Internal and special-purpose
array of int2, used in system tables
-
oidvector Internal and special-purpose
array of oids, used in system tables
-
json JSON
textual JSON data
-
jsonb JSON
binary JSON data, decomposed
-
jsonpath JSON
JSON path
-
datemultirange Multiranges
multirange of dates
-
int4multirange Multiranges
multirange of integers
-
int8multirange Multiranges
multirange of bigints
-
nummultirange Multiranges
multirange of numerics
-
tsmultirange Multiranges
multirange of timestamps without time zone
-
tstzmultirange Multiranges
multirange of timestamps with time zone
-
cidr Network addresses
IPv4 or IPv6 network address
-
inet Network addresses
IPv4 or IPv6 host address
-
bigint Numeric
signed eight-byte integer
-
double precision Numeric
double precision floating-point number (8 bytes)
-
integer Numeric
signed four-byte integer
-
money Numeric
currency amount
-
numeric Numeric
exact numeric of selectable precision
-
real Numeric
single precision floating-point number (4 bytes)
-
smallint Numeric
signed two-byte integer
-
cid Object and transaction identifiers
command identifier type, sequence in transaction id
-
oid Object and transaction identifiers
numeric object identifier
-
Not recorded in the selected version.
-
regclass Object and transaction identifiers
relation name
-
regcollation Object and transaction identifiers
collation name
-
regconfig Object and transaction identifiers
text search configuration
-
Not recorded in the selected version.
-
regdictionary Object and transaction identifiers
text search dictionary
-
regnamespace Object and transaction identifiers
namespace name
-
regoper Object and transaction identifiers
operator name
-
regoperator Object and transaction identifiers
operator with argument types
-
regproc Object and transaction identifiers
function name
-
regprocedure Object and transaction identifiers
function with argument types
-
regrole Object and transaction identifiers
role name
-
regtype Object and transaction identifiers
data type name
-
tid Object and transaction identifiers
tuple physical location, format '(block,offset)'
-
xid Object and transaction identifiers
transaction id
-
xid8 Object and transaction identifiers
full transaction id
-
aclitem Other built-in types
access control list
-
bytea Other built-in types
binary data ( “ byte array ” )
-
gtsvector Other built-in types
GiST index internal text representation for text search
-
macaddr Other built-in types
MAC (Media Access Control) address
-
macaddr8 Other built-in types
MAC (Media Access Control) address (EUI-64 format)
-
pg_lsn Other built-in types
PostgreSQL Log Sequence Number
-
pg_snapshot Other built-in types
user-level transaction ID snapshot
-
refcursor Other built-in types
reference to cursor (portal name)
-
Not recorded in the selected version.
-
txid_snapshot Other built-in types
user-level transaction ID snapshot (deprecated; see pg_snapshot )
-
uuid Other built-in types
universally unique identifier
-
xml Other built-in types
XML data
-
any Pseudo-types
Indicates that a function accepts any input data type.
-
anyarray Pseudo-types
Indicates that a function accepts any array data type (see Section 36.2.5 ).
-
anycompatible Pseudo-types
Indicates that a function accepts any data type, with automatic promotion of multiple arguments to a common data type (see Section 36.2.5 ).
-
anycompatiblearray Pseudo-types
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 ).
-
anycompatiblemultirange Pseudo-types
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 ).
-
anycompatiblenonarray Pseudo-types
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 ).
-
anycompatiblerange Pseudo-types
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 ).
-
anyelement Pseudo-types
Indicates that a function accepts any data type (see Section 36.2.5 ).
-
anyenum Pseudo-types
Indicates that a function accepts any enum data type (see Section 36.2.5 and Section 8.7 ).
-
anymultirange Pseudo-types
Indicates that a function accepts any multirange data type (see Section 36.2.5 and Section 8.17 ).
-
anynonarray Pseudo-types
Indicates that a function accepts any non-array data type (see Section 36.2.5 ).
-
anyrange Pseudo-types
Indicates that a function accepts any range data type (see Section 36.2.5 and Section 8.17 ).
-
cstring Pseudo-types
Indicates that a function accepts or returns a null-terminated C string.
-
event_trigger Pseudo-types
An event trigger function is declared to return event_trigger.
-
fdw_handler Pseudo-types
A foreign-data wrapper handler is declared to return fdw_handler .
-
index_am_handler Pseudo-types
An index access method handler is declared to return index_am_handler .
-
internal Pseudo-types
Indicates that a function accepts or returns a server-internal data type.
-
language_handler Pseudo-types
A procedural language call handler is declared to return language_handler .
-
Not recorded in the selected version.
-
pg_ddl_command Pseudo-types
Identifies a representation of DDL commands that is available to event triggers.
-
record Pseudo-types
Identifies a function taking or returning an unspecified row type.
-
table_am_handler Pseudo-types
A table access method handler is declared to return table_am_handler .
-
trigger Pseudo-types
A trigger function is declared to return trigger.
-
tsm_handler Pseudo-types
A tablesample method handler is declared to return tsm_handler .
-
unknown Pseudo-types
Identifies a not-yet-resolved type, e.g., of an undecorated string literal.
-
void Pseudo-types
Indicates that a function returns no value.
-
daterange Ranges
range of dates
-
int4range Ranges
range of integers
-
int8range Ranges
range of bigints
-
numrange Ranges
range of numerics
-
tsrange Ranges
range of timestamps without time zone
-
tstzrange Ranges
range of timestamps with time zone
-
bigserial SQL conveniences
autoincrementing eight-byte integer
-
serial SQL conveniences
autoincrementing four-byte integer
-
smallserial SQL conveniences
autoincrementing two-byte integer
-
tsquery Text search
text search query
-
tsvector Text search
text search document
-
Arrays Type families
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.
-
Composite types Type families
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 colu…
-
Domains Type families
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 — f…
-
Enumerated types Type families
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 …
RecordedFirst recordedInterface or attribute changeNo longer recorded
Squares indicate presence in sampled builds, not first introduction. Select a square for the same-version definition and sources.
Reading this collection
Named built-in types, pseudo-types and type families have distinct entries. Serial forms are SQL conveniences. User-defined types and extension types are outside this core inventory. A manual definition is not a measured catalog property.
Connected reference
Explore OID Types for object lookup, Index AM for query capabilities, or pg_type for catalog fields. Each type page connects its same-build cast, operator and operator-class records.
Core source inventory: PostgreSQL 10–20. Older manuals remain available under Documentation. Catalog facts come from source bootstrap records; they are not measurements from a running server.