PostgreSQL Data Types

PostgreSQL is rich in data types. Data types of any database are: numeric,characters, dates/times xml, array and Geometric so on.

Data Type Description Storafge Size in Bytes
bigint Singed 8-byte integer 8
bigserial auto-incrementing 8-byte integer 8
bit fixed length bit string
smallint small-integer 2
integer Integer 4
decimal user-specified precision, exact varies
real variable-precision, inexact varies
serial auto-incrementing 8-byte integer 4
smallserial auto-incrementing 8-byte integer 2
money currency 8
varchar(n) variable-length with limit variable-length with limit
char(n) fixed-length
text variable-length with limit variable-length with limit
timestamp Both time and date 8
date date 4
time time of the day 8
interval time in interval 16
boolean True or false 1
point point in plane 16
line line 32
lseg 32 line segment
box Rectangular Box 32
circle Circle 24
path Open path 32
time time of the day 8
polygon polygon 56
xml xml
Powered by k2schools