Mapping Between PostgreSQL and GaussDB(DWS) 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 GaussDB(DWS).
Type |
PostgreSQL Data Type |
GaussDB(DWS) Data Type |
Description |
---|---|---|---|
String |
CHAR(M) |
CHAR(M) |
Fixed-length string, filled with spaces |
VARCHAR(M) |
VARCHAR(M) |
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 |
BOOL |
Logical Boolean value (true/false) |
SMALLINT |
SMALLINT |
int2 |
|
INTEGER |
INTEGER |
int/int4 |
|
BIGINT |
BIGINT |
int8 |
|
DECIMAL(M,D) |
DECIMAL(M,D) |
Accurate number with precision |
|
NUMERIC(M,D) |
NUMERIC(M,D) |
Equivalent to NUMERIC |
|
REAL |
REAL |
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. |
|
Date and time |
DATE |
TMESTAMP |
A date (without the specific time) at the source will be converted to a timestamp consisting of the date and time at the destination. |
TIME(M) |
TIME |
Time of a day (without the date) |
|
TIME(M) WITH TIME ZONE |
TIMETZ |
Time of a day, with the time zone but without the date |
|
TIMESTAMP(M) |
TMESTAMP |
Data and time, without the time zone |
|
TIMESTAMP(M) WITH TIME ZONE |
TMESTAMPTZ |
Data and time, with the time zone |
|
INTERVAL |
INTERVAL |
Time interval |
|
Binary |
BYTEA |
BYTEA |
Binary data ("byte array") |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.