Table of Contents

Search

  1. Preface
  2. Database Ingestion and Replication

Database Ingestion and Replication

Database Ingestion and Replication

Microsoft SQL Server Source and PostgreSQL Target

Microsoft SQL Server Source and PostgreSQL Target

The following table identifies the recommended data-type mappings for
Database Ingestion and Replication
configurations with a Microsoft SQL Server source and a PostgreSQL target:
Microsoft SQL Server Source Data Type
PostgreSQL Target Data Type
bigint
bigint
binary(
size
), 1 <= size <= 8000
bytea
bit
boolean
char(
size
), 1 <= size <= 8000
character varying(
size
), 1 <= size <= 8000
date
date
datetime
timestamp(3)
datetime2(
precision
), 0 <= p <= 6
timestamp(
precision
), 0 <= p <= 6
datetime2(7)
timestamp(6)
datetimeoffset(
precision
), 0 <= p <= 6
timestamptz(
precision
), 0 <= p <= 6
datetimeoffset(7)
timestamptz(6)
decimal(p,s), 1 <= p <= 38, 1 <= s <= 38
numeric(p,s), 1 <= p <= 38, 1 <= s <= 38
decimal(p,s), 1 <= p <= 38, s = 0
numeric(p), 1 <= p <= 38
float
double precision
geography
bytea
geometry
bytea
hierarchyid
bytea
image
bytea
int
integer
money
decimal(19,4)
nchar(
size
), 1 <= size <= 4000
character varying(
size
), 2 <= size <= 8000
ntext
text
numeric(p,s), 1 <= p <= 38, s = 0)
numeric(p), 1 <= p <= 38
numeric(p,s), 1 <= p <= 38, 0 <= s <= 38
number(p,s), 1 <= p <= 38, 0 <= s <= 38
nvarchar(
size
), 1 <= size <= 4000
character varying(
size
), 2 <= size <= 8000
real
real
smalldatetime
timestamp(0)
smallint
smallint
smallmoney
decimal(10,4)
sql_variant
bytea
text
text
time(
precision
), 0 <= p <= 6
time(
precision
), 0 <= p <= 6
time(7)
time(6)
timestamp(8)
bytea
tinyint
smallint
uniqueidentifier
uuid
varbinary(
size
), 1 <= size <= 8000
bytea
varchar(
size
), 1 <= size <= 8000
character varying (
size
), 1 <= size <= 8000
varchar(
max
)
text
xml
xml
LOB limitations
Database ingestion and replication
initial load jobs can replicate data from SQL Server GEOGRAPHY, GEOMETRY, IMAGE, NTEXT, NVARCHAR(MAX), TEXT, VARBINARY(MAX), VARCHAR(MAX), and XML columns to PostgreSQL targets. LOB data might be truncated before being written to the target. For all of the LOB data types, the truncation point is 16777216 bytes. For more information, see the "Include LOBs" description in Configuring the source.
Unsupported source data types
None.

0 COMMENTS

We’d like to hear from you!