SQL Server vs. PostgreSQL — Pros and Cons for the Switch

SQL Server or PostgreSQL — the question is rarely “which database is better?” but “which one fits your budget, your team and your platform?”. Whoever confuses the two questions migrates for the wrong reasons and only notices once the licensing bill shrinks while operating costs grow. Quick overview: Prerequisite: Hands-on SQL Server experience is all you … Read more

Data Migration: SQL Server to PostgreSQL — the Complete Guide

A data migration from SQL Server to PostgreSQL rarely fails at actually copying the data. It fails at the silent differences that only surface in the target: datetime, which knows no time zone, bit, which is not a boolean, an IDENTITY that turns into a sequence, and a collation that suddenly compares case-sensitively. Anyone who sets out to migrate SQL Server to PostgreSQL isn’t … Read more

Verifying the Migration — Data Quality and Row Reconciliation After the Move

The row counts match — table by table, source against target, all green. And yet the migration isn’t finished. In one column, NULL values have turned into empty strings; in another, the detour through a CSV file rounded the last decimal of an amount; and a handful of accented characters collapsed into question marks. Same count is not … Read more

Porting T-SQL to PL/pgSQL — Migrating Procedures and Functions

The data is over, the schema stands — and then there are 200 stored procedures sitting there that no tool translates for you. pgloader migrates tables and data, but the logic in procedures, functions, and triggers stays behind. This is the phase that’s actually work: porting T-SQL to PL/pgSQL, line by line, with understanding instead of search-and-replace. The … Read more

Schema Migration SQL Server → PostgreSQL — Identity, Constraints, Defaults, Sequences

A SQL Server to PostgreSQL schema migration looks finished the moment the CREATE TABLE script runs without an error. That is exactly when the real trouble begins: the table is there, the data is loaded — and the first INSERT that should hand out a new ID collides with an existing key. The reason is not a typo but a change … Read more

Data Type Mapping SQL Server → PostgreSQL — What Converts Cleanly and What Breaks

A migration from SQL Server to PostgreSQL rarely fails at actually copying the data. It fails at datetime, where the choice between timestamp and timestamptz is anything but cosmetic, at bit, which is not a boolean, and at money, which you’d be better off not touching in PostgreSQL at all. The SQL Server to PostgreSQL data type mapping decides whether the data arrives cleanly — … Read more