PostgreSQL schemas and search_path behavior are mapped
into SQL Server schemas, usually with dbo as the target
default. Quoted mixed-case identifiers can be normalized or preserved
with SQL Server bracket quoting.
serial, bigserial, identity columns, and
standalone sequences are moved to SQL Server IDENTITY
columns or sequence-backed defaults, with reseeding checked after
the bulk load.
DBConvert proposes SQL Server storage for PostgreSQL scalar,
binary, text, date/time, JSON, and less direct types. You review
those choices before the target table is created.
Partial and expression indexes can move to filtered indexes or
computed-column patterns where the SQL Server semantics match.
GiST, GIN, and exclusion constraints are flagged for review.
DBConvert covers tables, fields, defaults, indexes, views, and
foreign keys. PL/pgSQL functions, triggers, rules, custom
operators, and extension-backed behavior are rewritten manually
in T-SQL.
Application SQL portability
ILIKE, RETURNING, ON CONFLICT,
DISTINCT ON, LIMIT/OFFSET,
:: casts, arrays, and jsonb operators need
an application SQL review before SQL Server becomes the write target.
Type mapping checkpoints
| PostgreSQL source type |
SQL Server target type |
Migration note |
uuid |
uniqueidentifier |
Direct mapping for IDs and foreign keys. |
bytea |
varbinary(max) |
Binary payloads and file-like values. |
boolean |
bit |
True / false storage in SQL Server. |
timestamp with time zone |
datetimeoffset |
Keep offset-aware values where the application needs them. |
text, jsonb |
nvarchar(max) |
JSON remains text, with SQL Server JSON functions as the access path. |
Arrays, ranges, enums, domains, interval, network types |
Selected SQL Server storage policy |
Confirm per column when there is no direct SQL Server equivalent. |
PL/pgSQL code - out of scope
DBConvert's migration covers tables (with their fields, types, defaults, and indexes),
views, and foreign keys. PostgreSQL functions, triggers, rules, and PL/pgSQL code stay in
the source and are rewritten manually in T-SQL - treat that as an application and
database rewrite task running beside the schema and data migration.