Home > Documentation > Oracle to PostgreSQL

Oracle to PostgreSQL Types Mapping

[Oracle to Postgres Converter]  [About Migration]  [Converting Views]

Although Oracle and PostgreSQL have similar sets of data types, some of source data types do not have direct equivalent in the destination DBMS. When planning or implementing database migration from Oracle to PostgreSQL, it is important to remember the appropriate type mappings:

Oracle PostgreSQL
BFILE VARCHAR(255)
BINARY_FLOAT REAL
BINARY_DOUBLE DOUBLE PRECISION
BLOB BYTEA
CHAR(n), CHARACTER(n) CHAR(n), CHARACTER(n)
CLOB TEXT
DATE TIMESTAMP
DECIMAL(p,s), DEC(p,s) DECIMAL(p,s), DEC(p,s)
DOUBLE PRECISION DOUBLE PRECISION
FLOAT(p) DOUBLE PRECISION
INT, INTEGER INT, INTEGER
LONG TEXT
LONG RAW BYTEA
NCHAR(n) CHAR(n)
NCHAR VARYING(n) VARCHAR(n)
NCLOB TEXT
NUMBER(p,0), NUMBER(p), 1 <= p < 5 SMALLINT
NUMBER(p,0), NUMBER(p), 5 <= p < 9 INT
NUMBER(p,0), NUMBER(p), 9 <= p < 19 BIGINT
NUMBER(p,0), NUMBER(p), p >= 19 DECIMAL(p)
NUMBER(p,s) DECIMAL(p,s)
NUMBER, NUMBER(*) DOUBLE PRECISION
NUMERIC(p,s) NUMERIC(p,s)
NVARCHAR2(n) VARCHAR(n)
RAW(n) BYTEA
REAL DOUBLE PRECISION
ROWID CHAR(10)
SMALLINT SMALLINT
TIMESTAMP(p) TIMESTAMP(p)
TIMESTAMP(p) WITH TIME ZONE TIMESTAMP(p) WITH TIME ZONE
VARCHAR(n) VARCHAR(n)
VARCHAR2(n) VARCHAR(n)
XMLTYPE XML