Data Types

Each value that Amazon Redshift stores or retrieves has a data type with a fixed set
of
associated properties. Data types are declared when tables are created. A data type
constrains the set of values that a column or argument can contain.

The following table lists the data types that you can use in Amazon Redshift tables.

Data Type

Aliases

Description

SMALLINT

INT2

Signed two-byte integer

INTEGER

INT, INT4

Signed four-byte integer

BIGINT

INT8

Signed eight-byte integer

DECIMAL

NUMERIC

Exact numeric of selectable precision

REAL

FLOAT4

Single precision floating-point number

DOUBLE PRECISION

FLOAT8, FLOAT

Double precision floating-point number

BOOLEAN

BOOL

Logical Boolean (true/false)

CHAR

CHARACTER, NCHAR, BPCHAR

Fixed-length character string

VARCHAR

CHARACTER VARYING, NVARCHAR, TEXT

Variable-length character string with a user-defined
limit

DATE

Calendar date (year, month, day)

TIMESTAMP

TIMESTAMP WITHOUT TIME ZONE

Date and time (without time zone)

TIMESTAMPTZ

TIMESTAMP WITH TIME ZONE

Date and time (with time zone)

Multibyte
Characters

The VARCHAR data type supports UTF-8 multibyte characters up to a maximum of
four bytes. Five-byte or longer characters are not supported. To calculate the
size of a VARCHAR column that contains multibyte characters, multiply the number
of characters by the number of bytes per character. For example, if a string has
four Chinese characters, and each character is three bytes long, then you will
need a VARCHAR(12) column to store the string.