Help Center/ DataArts Studio/ User Guide/ DataArts Migration (Real-Time Jobs)/ Field Type Mapping/ Mapping Between PostgreSQL and Doris Field Types
Updated on 2025-09-09 GMT+08:00

Mapping Between PostgreSQL and Doris Field Types

DataArts Migration converts the source field type to the destination field type based on the default rule, and creates tables and synchronizes data in real time.

Field Type Mapping Rules

The following table lists the field types supported by a job that migrates data from PostgreSQL to Doris.

Table 1 Field types supported by a job that migrates data from PostgreSQL to Doris

Type

PostgreSQL Data Type

Doris Data Type

Description

String

CHAR(M)

CHAR(3M)

Fixed-length string, filled with spaces

VARCHAR(M)

VARCHAR(3M)

Variable-length string with an upper limit of length

TEXT

TEXT

Variable-length string with no upper limit of length, similar to VARCHAR without length declaration

Value

BOOLEAN

BOOLEAN

Logical Boolean value (true/false)

SMALLINT

SMALLINT

int2

INTEGER

INTEGER

int/int4

BIGINT

BIGINT

int8

DECIMAL(M,D)

DECIMAL(M,D)

1. If the Doris version is earlier than 1.2.1, when M is greater than 27, the data type is converted to TEXT. When D is greater than 9, the data type is converted to TEXT.

2. If the Doris version is 1.2.1 or later, when M is greater than 38, the data type is converted to TEXT.

NUMERIC(M,D)

DECIMAL(M,D)

REAL

FLOAT

Single-precision floating point number (4 bytes)

DOUBLE

DOUBLE

Double-precision floating point number (8 bytes). It can also be represented by FLOAT without precision.

Bit

BIT(M)

TEXT

Data of the BIT type must match the length M.

BIT VARYING(M)

TEXT

This type is a variable-length type of the maximum length M.

Time and date

DATE

DATE

Date (1970-01-01)

TIME(M)

TEXT

Time of a day (08:00:00)

TIME(M) WITH TIME ZONE

TEXT

Time of a day, with the time zone (08:00:00). It is TIMETZ.

TIMESTAMP(M)

DATETIME

Date and time without the time zone (1970-01-01 00:00:00)

TIMESTAMP(M) WITH TIME ZONE

DATETIME

Date and time with the time zone (1970-01-01 00:00:00). It is TIMESTAMPTZ.

INTERVAL

TEXT

Time interval

Binary

BYTEA

TEXT

Binary data ("byte array")

Special type

MONEY

DECIMAL(27,2)

Currency numbers with fixed decimal precision, for example, $1,000.00