0% found this document useful (0 votes)
36 views

PostgresSQL Types

The document lists various data types that can be used in PostgreSQL including their names, aliases and short descriptions. It includes common numeric and string types as well as types for timestamps, JSON, XML and others.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

PostgresSQL Types

The document lists various data types that can be used in PostgreSQL including their names, aliases and short descriptions. It includes common numeric and string types as well as types for timestamps, JSON, XML and others.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Name Aliases Description

bigint int8 signed eight-byte integer

bigserial serial8 autoincrementing eight-byte integer

bit [ (n) ] fixed-length bit string

bit varying [ (n) ] varbit [ (n) variable-length bit string


]

boolean bool logical Boolean (true/false)

box rectangular box on a plane

bytea binary data (“byte array”)

character [ (n) ] char [ (n) ] fixed-length character string

character varying [ varchar [ (n) variable-length character string


(n) ] ]

cidr IPv4 or IPv6 network address

circle circle on a plane

date calendar date (year, month, day)

double precision float8 double precision floating-point


number (8 bytes)

inet IPv4 or IPv6 host address


integer int, int4 signed four-byte integer

interval [ fields ] [ time span


(p) ]

json textual JSON data

jsonb binary JSON data, decomposed

line infinite line on a plane

lseg line segment on a plane

macaddr MAC (Media Access Control) address

macaddr8 MAC (Media Access Control) address


(EUI-64 format)

money currency amount

numeric [ (p, s) ] decimal [ (p, exact numeric of selectable precision


s) ]

path geometric path on a plane

pg_lsn PostgreSQL Log Sequence Number

pg_snapshot user-level transaction ID snapshot

point geometric point on a plane

polygon closed geometric path on a plane


real float4 single precision floating-point number
(4 bytes)

smallint int2 signed two-byte integer

smallserial serial2 autoincrementing two-byte integer

serial serial4 autoincrementing four-byte integer

text variable-length character string

time [ (p) ] [ without time of day (no time zone)


time zone ]

time [ (p) ] with time timetz time of day, including time zone
zone

timestamp [ (p) ] [ date and time (no time zone)


without time zone ]

timestamp [ (p) ] with timestamptz date and time, including time zone
time zone

tsquery text search query

tsvector text search document

txid_snapshot user-level transaction ID snapshot


(deprecated; see pg_snapshot)

uuid universally unique identifier

xml XML data

You might also like