Jump to: navigation, search

Postgresql Data Types

From w3cyberlearnings
# Data Type Aliases Description
1 bigint int8 signed eight-byte integer
2 bigserial serial8 autoincrementing eight-byte integer
3 bit fixed-length bit string
4 bit varying varbit variable-length bit string
5 boolean bool logical Boolean (true/false)
6 box rectangular box on a plane
7 bytea binary data ("byte array")
8 character varying varchar variable-length character string
9 character char fixed-length character string
10 cidr IPv4 or IPv6 network address
11 circle circle on a plane
12 date calendar date (year, month, day)
13 double precision float8 double precision floating-point number (8 bytes)
14 inet IPv4 or IPv6 host address
15 integer int, int4 signed four-byte integer
16 interval time span
17 line infinite line on a plane
18 lseg line segment on a plane
19 macaddr MAC (Media Access Control) address
20 money currency amount
21 numeric decimal [ (p, s) ] exact numeric of selectable precision
22 path geometric path on a plane
23 point geometric point on a plane
24 polygon closed geometric path on a plane
25 real float4 single precision floating-point number (4 bytes)
26 smallint int2 signed two-byte integer
27 smallserial serial2 autoincrementing two-byte integer
28 serial serial4 autoincrementing four-byte integer
29 text variable-length character string
30 time without time zone time of day (no time zone)
31 time with time zone timetz time of day, including time zone
32 timestamp without time zone date and time (no time zone)
33 timestamp with time zone timestamptz date and time, including time zone
34 tsquery text search query
35 tsvector text search document
36 txid_snapshot user-level transaction ID snapshot
37 uuid universally unique identifier
38 xml XML data
39 json JSON data

Related Links

Navigation
Web
SQL
MISC
References