Reference

Oracle to PostgreSQL type mapping.

Trekport maps Oracle data types to PostgreSQL targets deterministically. Mapping rules are configurable on enterprise tiers; the default behavior is documented below.

Numeric types

Oracle typePostgreSQL targetNotes
NUMBERnumeric / int / bigint / booleanPrecision and scale drive the target. NUMBER(1) optionally maps to boolean. NUMBER(p,s) → numeric(p,s).
BINARY_FLOATrealIEEE single-precision floating point.
BINARY_DOUBLEdouble precisionIEEE double-precision floating point.
FLOAT(b)double precisionVariable-precision binary. PG double precision matches semantics.

Text types

Oracle typePostgreSQL targetNotes
VARCHAR2(n)varchar(n)Length semantics preserved. CHAR and BYTE semantics honored from the source.
NVARCHAR2(n)varchar(n)PostgreSQL is UTF-8 by default.
CHAR(n)char(n)Blank padding behavior preserved.
CLOBtextPostgreSQL text is unbounded.
NCLOBtextPostgreSQL text is UTF-8 by default.
LONGtextDeprecated Oracle type. Convert during the migration.

Temporal types

Oracle typePostgreSQL targetNotes
DATEtimestampOracle DATE includes a time component. Target is timestamp without time zone.
TIMESTAMPtimestampWITHOUT TIME ZONE.
TIMESTAMP WITH TIME ZONEtimestamptzTime zone offset preserved.
TIMESTAMP WITH LOCAL TIME ZONEtimestamptzConverted to UTC and stored as timestamptz.
INTERVAL YEAR TO MONTHintervalNative PostgreSQL interval with year-month semantics.
INTERVAL DAY TO SECONDintervalNative PostgreSQL interval with day-second semantics.

Binary and LOB types

Oracle typePostgreSQL targetNotes
BLOBbyteaBinary content preserved through the loader.
RAW(n)byteaLength is informational only in PostgreSQL.
LONG RAWbyteaDeprecated Oracle type. Convert during the migration.
BFILEFilesystem referenceExternal-LOB pattern. Trekport ships a helper view.

Advanced and object types

Oracle typePostgreSQL targetNotes
XMLTYPExmlNative PostgreSQL xml type with validation.
ROWID / UROWIDSurrogate primary keyApplication-level pattern preserved. ROWID-dependent code flagged for review.
SDO_GEOMETRYgeometry (PostGIS)Requires PostGIS at the target. Spatial indexes converted.
REFComposite typeMapped through the PostgreSQL composite type system.
OBJECT typeComposite typeMethods lowered to schema-qualified functions.
TABLE OF typeArray of element typeMapped to PostgreSQL array types.
VARRAYArray of element typeBounds preserved as a check constraint.

Configuration

On enterprise tiers, the default mappings can be overridden per column, per table, or per schema. Overrides are versioned in the project configuration and replayed deterministically. See the conversion walkthrough for where overrides plug into the pipeline.

Related reading