Boolean and binary types

boolean, bool

A single true or false value.

SQL99

bit(
n
)

An
n
length bit string (exactly
n
binary bits).

SQL92

bit varying(
n
), varbit(
n
)

A variable
n
length bit string (up to
n
binary bits)

SQL92

Character types

character (
n
), char(
n
)

A fixed
n
length character string.

SQL89

character varying(
n
), varchar(
n
)

A variable length character string of up to
n
characters.

SQL92

text

A variable length character string, of unlimited length.

PostgreSQLspecific

Numeric types

smallint, int2

A signed 2byte integer.

SQL89

integer, int, int4

A signed, fixedprecision 4byte number.

SQL92

bigint, int8

A signed 8byte integer, up to 18 digits in length.

PostgreSQLspecific

real, float4

A 4byte floatingpoint number.

SQL89

double precision, float8, float

An 8byte floatingpoint number.

SQL89

numeric(
p
,
s
), decimal(
p
,
s
)

An exact numeric type with arbitrary precision
p
, and scale
s
.

SQL99

money

A fixed precision, U.S.style currency.

PostgreSQLspecific, deprecated.

serial

An autoincrementing 4byte integer.

PostgreSQLspecific

Date and time types

date

The calendar date (day, month and year).

SQL92

time

The time of day.

SQL92

time with time zone

The time of day, including time zone information.

SQL92

timestamp (includes time zone)

Both the date and time.

SQL92

interval

An arbitrarily specified length of time.

SQL92

Geometric types

box

A rectangular box in a 2D plane.

PostgreSQLspecific

line

An infinite line in a 2D plane.

PostgreSQLspecific

lseg

A finite line segment in a 2D plane.

PostgreSQLspecific

circle

A circle with center and radius.

PostgreSQLspecific

path

Open and closed geometric paths in a twodimensional plane.

PostgreSQLspecific

point

geometric point in a 2D plane

PostgreSQLspecific

polygon

A closed geometric path in a 2D plane.

PostgreSQLspecific

Network types

cidr

An IP network specification.

PostgreSQLspecific

inet

A network IP address, with optional subnet bits.

PostgreSQLspecific

macaddr

A MAC address (e.g., an Ethernet card's hardware address).

PostgreSQLspecific

System types

oid

An object (row) identifier.

PostgreSQLspecific

xid

A transaction identifier.

PostgreSQLspecific
