Today we are announcing HexaBridge for SQL Server, which brings deep SQL Server compatibility for PostgreSQL to Community PostgreSQL with no proprietary fork required. HexaBridge resolves SQL Server's T-SQL functions, data types, and operators natively inside PostgreSQL, so a SQL Server to PostgreSQL migration no longer means rewriting every built-in by hand. If you are planning a SQL Server to PostgreSQL migration, HexaBridge is the runtime compatibility layer that lets your T-SQL run on PostgreSQL with its original behavior intact.
This is the SQL Server counterpart to HexaBridge for Oracle, and it follows the same principle: install one extension on standard PostgreSQL and your application's built-in calls keep working, without a commercial database fork.

Migrating SQL Server to PostgreSQL is two problems, not one. The first is converting schema and application code, which modern tooling handles well. The second is harder and quieter: SQL Server applications lean on hundreds of built-in functions, data types, and operators that simply do not exist in PostgreSQL with the same names or the same semantics. DATEADD, DATEDIFF, CHARINDEX, ISNULL, TRY_CONVERT, nvarchar, hierarchyid, and many more have no native PostgreSQL equivalent.
AI assistants and migration tools can convert your code, but they cannot recreate the SQL Server runtime on PostgreSQL. That work has to live in the database itself. HexaBridge for SQL Server is exactly that layer: the built-in compatibility that the rest of the migration depends on.
Near 100% automated conversion for enterprise databases including Oracle, SQL Server, MySQL, MariaDB, DB2, Cassandra and PostgreSQL.
Explore HexaRocketZero-lag CDC replication with better visibility, simplified configuration, and enterprise-grade monitoring.
Learn MoreAssessment, schema conversion, replication, rollback, and migration visibility - all from one platform.
Explore HexaCluster ProductsHexaBridge installs into the sys schema so that ported T-SQL resolves sys.* and dbo.* names just like it did on SQL Server. After a single SET search_path TO sys, public;, your code runs unchanged. It delivers:
CHARINDEX, PATINDEX, LEN, DATEADD, DATEDIFF, EOMONTH, FORMAT, TRY_CONVERT, ISNULL, IIF, OPENJSON, CHECKSUM, and STRING_SPLIT.nvarchar(n) with trailing-space-insensitive comparison, the datetime family, uniqueidentifier, rowversion, smallmoney, sql_variant, and a complete hierarchyid type with exact depth-first ordering.+ string concatenation and the full hierarchyid comparison set.COMPRESS and DECOMPRESS, byte-interoperable with SQL Server so values move cleanly between engines.The functions that need real logic, such as DATEDIFF boundary-crossing math, character-accurate CHARINDEX, and hierarchyid ordering, are written in C for exactness and speed. Direct mappings are inlined by the planner, so the compatibility layer adds no performance overhead. You get SQL Server behavior at native PostgreSQL speed.
Surface-level shims are easy; the value is in the details. HexaBridge reproduces SQL Server semantics that trip up naive rewrites: LEN excludes trailing spaces, nvarchar comparison is trailing-space-insensitive, DATEDIFF counts boundary crossings rather than elapsed units, and hierarchyid sorts in true depth-first order rather than as plain text. These are the behaviors that decide whether a migrated query returns the right answer.
For workloads that use SQL Server geometry and geography, HexaBridge offers an optional spatial module built on PostGIS. It is opt-in: the core extension carries no PostGIS dependency and runs fine without it. We are going to write about the engineering behind faithful spatial mapping, and why parity there is measured with tolerance rather than exact equality, in our upcoming companion article "SQL Server Spatial to PostGIS: Why Parity Needs Tolerance, Not Equality" on the HexaCluster blog. Please watch out for our announcement of this article.
HexaBridge is a standard PostgreSQL extension. It installs on Community PostgreSQL with a single CREATE EXTENSION command and needs no proprietary or commercial PostgreSQL fork. That keeps you on mainstream PostgreSQL, with all of its ecosystem, support options, and cloud availability.
CREATE EXTENSION hexabridge_mssql;
SET search_path TO sys, public;
SELECT charindex('cd', 'abcdef', 2); -- 3
SELECT dateadd('month', 2, '2021-01-31'); -- 2021-03-31 00:00:00
SELECT datediff('year', '2020-12-31', '2021-01-01'); -- 1 (boundary crossing)
SELECT isnull(NULL, 'default'); -- default
HexaBridge is the runtime half of the story. The other half is HexaRocket, our end-to-end database migration platform, which converts schema and code and moves data with validation and CDC-based live replication. Because HexaBridge supplies the built-in compatibility that tools cannot generate, HexaRocket can take a SQL Server to PostgreSQL migration all the way to 100% automatic schema conversion. Without this compatibility layer, every built-in your application relies on becomes a manual rewrite that no tool can fully automate.
HexaBridge for SQL Server is available to customers who migrate with HexaRocket and to customers of HexaCluster-approved partners. To see it against your own workload, explore the HexaBridge product page or talk to our migration team.
If you need expert support migrating legacy or complex Oracle, SQL Server, MySQL, MariaDB, DB2, Sybase ASE, or Cassandra, PostgreSQL or distributed databases, we’re here to help.
HexaCluster provides end-to-end migration and modernization services, including application migration and modernization, database migration, and PostgreSQL consulting such as performance tuning, health audits, managed DBA services, and 24/7/365 support.
To start a conversation or explore how we can support your migration journey, please contact us at connect@hexacluster.ai
Subscribe to our Newsletters and Stay tuned for more interesting topics.

Avi is the CEO and Co-founder of HexaCluster. Avi has a rich background in PostgreSQL, development, and machine learning. Before joining HexaCluster, he co-founded MigOps, a company dedicated to facilitating migrations to Open-Source databases like PostgreSQL. His journey in the PostgreSQL domain started at Dell followed by OpenSCG as a Database Architect and later joined Percona to start the PostgreSQL practice. Avi loves contributing to PostgreSQL, speaking at PostgreSQL conferences and writing PostgreSQL books.
Start your migration journey 🚀
start your migration journey with our expert team
Database & Application Migration Assessment Tool
End-to-End Database Migration & Modernization Tool
Database Code Object Conversion to PostgreSQL
MyBatis Mapper Conversion to PostgreSQL
Enterprise Data Replication & Live CDC
Oracle Compatibility Layer for PostgreSQL