Data type differences between Amazon Redshift and supported RDS PostgreSQL or Aurora PostgreSQL databases - Amazon Redshift

Data type differences between Amazon Redshift and supported RDS PostgreSQL or Aurora PostgreSQL databases

The following table shows the mapping of an Amazon Redshift data type to a corresponding Amazon RDS PostgreSQL or Aurora PostgreSQL data type.

Amazon Redshift data type RDS PostgreSQL or Aurora PostgreSQL data type Description
SMALLINT SMALLINT Signed two-byte integer
INTEGER INTEGER Signed four-byte integer
BIGINT BIGINT Signed eight-byte integer
DECIMAL DECIMAL Exact numeric of selectable precision
REAL REAL Single precision floating-point number
DOUBLE PRECISION DOUBLE PRECISION Double precision floating-point number
BOOLEAN BOOLEAN Logical Boolean (true/false)
CHAR CHAR Fixed-length character string
VARCHAR VARCHAR Variable-length character string with a user-defined limit
DATE DATE Calendar date (year, month, day)
TIMESTAMP TIMESTAMP Date and time (without time zone)
TIMESTAMPTZ TIMESTAMPTZ Date and time (with time zone)
GEOMETRY PostGIS GEOMETRY Spatial data

The following RDS PostgreSQL and Aurora PostgreSQL data types are converted to VARCHAR(64K) in Amazon Redshift:

  • JSON, JSONB

  • Arrays

  • BIT, BIT VARYING

  • BYTEA

  • Composite types

  • Date and time types INTERVAL and TIME

  • Enumerated types

  • Monetary types

  • Network address types

  • Numeric types SERIAL, BIGSERIAL, SMALLSERIAL, and MONEY

  • Object identifier types

  • pg_lsn type

  • Pseudo-types

  • Range types

  • Text search types

  • TXID_SNAPSHOT

  • UUID

  • XML type