From:       To:      
Home > Documentation > PostgreSQL to SQL Server


PostgreSQL to SQL Server converter implements synchronization as inserting data that not exists in the destination table and updating MS SQL rows with the related PostgreSQL data. For synchronization purpose source and destination tables must have identical structures and have primary key or unique index defined.

Assume both MS SQL and PostgreSQL databases have table "People" defined as below:

        ID Integer NOT NULL, 
        FisrtName Varchar(50),
        LastName Varchar(50), 
        EMail Varchar(50), 
        Primary Key (ID)

This table has the following contents in PostgreSQL database:

2  Andrew  White
3  Phil  Johnson

In SQL Server database:

1  John  Smith
2  Andew  White

After synchronizing MS SQL with PostgreSQL data the source table is kept untouched and the destination table is modified as follows:

1  John  Smith
2  Andew  White
3  Phil  Johnson

If you're looking for bi-directional incremental synchronization between SQL Server and PostgreSQL, take a look at MSSQL-PostgreSQL Sync tool.