babelfishpg_tsql
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
babelfish | 5.4.0 | SIM | Apache-2.0 | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 9300 | babelfishpg_common | No | Yes | No | Yes | No | Yes | - |
| 9310 | babelfishpg_tsql | No | Yes | No | Yes | No | Yes | - |
| 9320 | babelfishpg_tds | No | Yes | Yes | Yes | No | Yes | - |
| 9330 | babelfishpg_money | No | Yes | No | Yes | Yes | No | - |
| Related | babelfishpg_common uuid-ossp babelfishpg_money pg_hint_plan tds_fdw session_variable orafce pgtt db_migrator |
|---|---|
| Depended By | babelfishpg_tds |
special case: this extension only works on wiltondb kernel fork
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 5.4.0 | 1817161514 | babelfish | babelfishpg_common, uuid-ossp |
| RPM | PIGSTY | 6.0.0 | 1817161514 | babelfish-$v | antlr4-runtime413 |
| DEB | PIGSTY | 6.0.0 | 1817161514 | babelfish-$v | libantlr4-runtime413 |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 6.0.0 | PIGSTY 5.4.0 | N/A | N/A | N/A |
| el8.aarch64 | PIGSTY 6.0.0 | PIGSTY 5.4.0 | N/A | N/A | N/A |
| el9.x86_64 | PIGSTY 6.0.0 | PIGSTY 5.4.0 | N/A | N/A | N/A |
| el9.aarch64 | PIGSTY 6.0.0 | PIGSTY 5.4.0 | N/A | N/A | N/A |
| el10.x86_64 | PIGSTY 6.0.0 | PIGSTY 5.4.0 | N/A | N/A | N/A |
| el10.aarch64 | PIGSTY 6.0.0 | PIGSTY 5.4.0 | N/A | N/A | N/A |
| d12.x86_64 | PIGSTY 6.0.0 | PIGSTY 5.4.0 | N/A | N/A | N/A |
| d12.aarch64 | PIGSTY 6.0.0 | PIGSTY 5.4.0 | N/A | N/A | N/A |
| d13.x86_64 | PIGSTY 6.0.0 | PIGSTY 5.4.0 | N/A | N/A | N/A |
| d13.aarch64 | PIGSTY 6.0.0 | PIGSTY 5.4.0 | N/A | N/A | N/A |
| u22.x86_64 | PIGSTY 6.0.0 | PIGSTY 5.4.0 | N/A | N/A | N/A |
| u22.aarch64 | PIGSTY 6.0.0 | PIGSTY 5.4.0 | N/A | N/A | N/A |
| u24.x86_64 | PIGSTY 6.0.0 | PIGSTY 5.4.0 | N/A | N/A | N/A |
| u24.aarch64 | PIGSTY 6.0.0 | PIGSTY 5.4.0 | N/A | N/A | N/A |
| u26.x86_64 | PIGSTY 6.0.0 | PIGSTY 5.4.0 | N/A | N/A | N/A |
| u26.aarch64 | PIGSTY 6.0.0 | PIGSTY 5.4.0 | N/A | N/A | N/A |
Build
You can build the RPM / DEB packages for babelfish using pig build:
pig build pkg babelfish # build RPM / DEB packages
Install
You can install babelfish directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
pig repo add pgsql -u # Add repo and update cache
Install the extension using pig or apt/yum/dnf:
pig install babelfish; # Install for current active PG version
pig ext install -y babelfish -v 18 # PG 18
pig ext install -y babelfish -v 17 # PG 17
dnf install -y babelfish-18 # PG 18
dnf install -y babelfish-17 # PG 17
apt install -y babelfish-18 # PG 18
apt install -y babelfish-17 # PG 17
Create Extension:
CREATE EXTENSION babelfishpg_tsql CASCADE; -- requires: babelfishpg_common, uuid-ossp
Usage
Sources:
- Babelfish extensions BABEL_5_4_0 README
- Installation guide
babelfishpg_tsqlcontrol file- Babelfish limitations
- Handling T-SQL
babelfishpg_tsql implements the T-SQL language and SQL Server-compatible catalog behavior used by Babelfish. It is one component of a Babelfish database, not a compatibility layer that can be added to stock PostgreSQL by itself: the complete stack requires the Babelfish-patched PostgreSQL engine plus the common, TDS, and T-SQL extensions.
Core Workflow
Configure the TDS protocol extension for preload and restart the Babelfish server:
shared_preload_libraries = 'babelfishpg_tds'
Create the TDS extension with CASCADE so its extension dependencies, including babelfishpg_tsql, are installed. Choose the migration mode before initialization.
CREATE EXTENSION IF NOT EXISTS babelfishpg_tds CASCADE;
ALTER SYSTEM SET babelfishpg_tsql.database_name = 'babelfish_db';
ALTER SYSTEM SET babelfishpg_tsql.migration_mode = 'multi-db';
CALL sys.initialize_babelfish('babelfish_user');
After configuration is reloaded as directed by the installation guide, SQL Server clients connect to the TDS listener, commonly on port 1433, and issue T-SQL in the logical databases created by Babelfish.
Component and Object Index
babelfishpg_tsqlsupplies the T-SQL parser, procedural language, system objects, compatibility functions, and T-SQL configuration variables.babelfishpg_tdssupplies the Tabular Data Stream listener and is the normal installation entry point.babelfishpg_commonsupplies shared data types and functions. It anduuid-osspare declared dependencies ofbabelfishpg_tsql.babelfishpg_moneysupplies money-related compatibility objects used by the stack.sys.initialize_babelfish(login_name)provisions the Babelfish catalogs and initial login.sys.sp_babelfish_configurecontrols documented compatibility escape hatches.babelfishpg_tsql.database_nameidentifies the physical PostgreSQL database hosting Babelfish.babelfishpg_tsql.migration_modeselectssingle-dbormulti-dblogical-database mapping.
Operational Boundaries
Installation requires superuser privileges and a Babelfish build matched to the extension release. Do not install babelfishpg_tsql alone and expect TDS connectivity. The migration mode is a provisioning decision and is not intended to be changed after the database is initialized.
Babelfish implements a substantial but incomplete SQL Server surface. Validate application syntax, data types, system-catalog assumptions, drivers, and escape-hatch settings against the official limitations before migration. PostgreSQL and T-SQL connections can observe different naming and transaction semantics.
The catalog change from 5.5.0 to 5.4.0 is a version correction to the official BABEL_5_4_0 release line, not evidence of a new feature or an automatic downgrade procedure.
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.