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 type | PostgreSQL target | Notes |
|---|---|---|
NUMBER | numeric / int / bigint / boolean | Precision and scale drive the target. NUMBER(1) optionally maps to boolean. NUMBER(p,s) → numeric(p,s). |
BINARY_FLOAT | real | IEEE single-precision floating point. |
BINARY_DOUBLE | double precision | IEEE double-precision floating point. |
FLOAT(b) | double precision | Variable-precision binary. PG double precision matches semantics. |
Text types
| Oracle type | PostgreSQL target | Notes |
|---|---|---|
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. |
CLOB | text | PostgreSQL text is unbounded. |
NCLOB | text | PostgreSQL text is UTF-8 by default. |
LONG | text | Deprecated Oracle type. Convert during the migration. |
Temporal types
| Oracle type | PostgreSQL target | Notes |
|---|---|---|
DATE | timestamp | Oracle DATE includes a time component. Target is timestamp without time zone. |
TIMESTAMP | timestamp | WITHOUT TIME ZONE. |
TIMESTAMP WITH TIME ZONE | timestamptz | Time zone offset preserved. |
TIMESTAMP WITH LOCAL TIME ZONE | timestamptz | Converted to UTC and stored as timestamptz. |
INTERVAL YEAR TO MONTH | interval | Native PostgreSQL interval with year-month semantics. |
INTERVAL DAY TO SECOND | interval | Native PostgreSQL interval with day-second semantics. |
Binary and LOB types
| Oracle type | PostgreSQL target | Notes |
|---|---|---|
BLOB | bytea | Binary content preserved through the loader. |
RAW(n) | bytea | Length is informational only in PostgreSQL. |
LONG RAW | bytea | Deprecated Oracle type. Convert during the migration. |
BFILE | Filesystem reference | External-LOB pattern. Trekport ships a helper view. |
Advanced and object types
| Oracle type | PostgreSQL target | Notes |
|---|---|---|
XMLTYPE | xml | Native PostgreSQL xml type with validation. |
ROWID / UROWID | Surrogate primary key | Application-level pattern preserved. ROWID-dependent code flagged for review. |
SDO_GEOMETRY | geometry (PostGIS) | Requires PostGIS at the target. Spatial indexes converted. |
REF | Composite type | Mapped through the PostgreSQL composite type system. |
OBJECT type | Composite type | Methods lowered to schema-qualified functions. |
TABLE OF type | Array of element type | Mapped to PostgreSQL array types. |
VARRAY | Array of element type | Bounds 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.

