Skip to content

babelfishpg_common

SQL Server Transact SQL Datatype Support

babelfish : SQL Server Transact SQL Datatype Support

Overview

ID Extension Package Version Category License Language
9300 babelfishpg_common babelfish 6.2.0 SIM Apache-2.0 C
Attribute Has Binary Has Library Need Load Has DDL Relocatable Trusted
--s-d-r No Yes No Yes yes no
PG17: Babelfish 5.7.0; PG18: 6.2.0. Package fields use PG18.

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
EXT PIGSTY 6.2.0 18 17 16 15 14 babelfish -
RPM PIGSTY 6.2.0 18 17 16 15 14 babelfish-$v antlr4-runtime413
DEB PIGSTY 6.2.0 18 17 16 15 14 babelfish-$v libantlr4-runtime413
Linux / PG PG18 PG17 PG16 PG15 PG14
el8.x86_64 PIGSTY 6.2.0 PIGSTY 5.7.0 N/A N/A N/A
el8.aarch64 PIGSTY 6.2.0 PIGSTY 5.7.0 N/A N/A N/A
el9.x86_64 PIGSTY 6.2.0 PIGSTY 5.7.0 N/A N/A N/A
el9.aarch64 PIGSTY 6.2.0 PIGSTY 5.7.0 N/A N/A N/A
el10.x86_64 PIGSTY 6.2.0 PIGSTY 5.7.0 N/A N/A N/A
el10.aarch64 PIGSTY 6.2.0 PIGSTY 5.7.0 N/A N/A N/A
d12.x86_64 PIGSTY 6.2.0 PIGSTY 5.7.0 N/A N/A N/A
d12.aarch64 PIGSTY 6.2.0 PIGSTY 5.7.0 N/A N/A N/A
d13.x86_64 PIGSTY 6.2.0 PIGSTY 5.7.0 N/A N/A N/A
d13.aarch64 PIGSTY 6.2.0 PIGSTY 5.7.0 N/A N/A N/A
u22.x86_64 PIGSTY 6.2.0 PIGSTY 5.7.0 N/A N/A N/A
u22.aarch64 PIGSTY 6.2.0 PIGSTY 5.7.0 N/A N/A N/A
u24.x86_64 PIGSTY 6.2.0 PIGSTY 5.7.0 N/A N/A N/A
u24.aarch64 PIGSTY 6.2.0 PIGSTY 5.7.0 N/A N/A N/A
u26.x86_64 PIGSTY 6.2.0 PIGSTY 5.7.0 N/A N/A N/A
u26.aarch64 PIGSTY 6.2.0 PIGSTY 5.7.0 N/A N/A N/A
Package Version OS ORG SIZE File URL
babelfish-18 6.2.0 el8.x86_64 pigsty 28.5 MiB babelfish-18-6.2.0-1PGSTY.el8.x86_64.rpm
babelfish-18 6.2.0 el8.aarch64 pigsty 27.9 MiB babelfish-18-6.2.0-1PGSTY.el8.aarch64.rpm
babelfish-18 6.2.0 el9.x86_64 pigsty 27.5 MiB babelfish-18-6.2.0-1PGSTY.el9.x86_64.rpm
babelfish-18 6.2.0 el9.aarch64 pigsty 27.1 MiB babelfish-18-6.2.0-1PGSTY.el9.aarch64.rpm
babelfish-18 6.2.0 el10.x86_64 pigsty 27.6 MiB babelfish-18-6.2.0-1PGSTY.el10.x86_64.rpm
babelfish-18 6.2.0 el10.aarch64 pigsty 27.2 MiB babelfish-18-6.2.0-1PGSTY.el10.aarch64.rpm
babelfish-18 6.2.0 d12.x86_64 pigsty 24.5 MiB babelfish-18_6.2.0-1PGSTY~bookworm_amd64.deb
babelfish-18 6.2.0 d12.aarch64 pigsty 23.9 MiB babelfish-18_6.2.0-1PGSTY~bookworm_arm64.deb
babelfish-18 6.2.0 d13.x86_64 pigsty 24.8 MiB babelfish-18_6.2.0-1PGSTY~trixie_amd64.deb
babelfish-18 6.2.0 d13.aarch64 pigsty 24.1 MiB babelfish-18_6.2.0-1PGSTY~trixie_arm64.deb
babelfish-18 6.2.0 u22.x86_64 pigsty 29.9 MiB babelfish-18_6.2.0-1PGSTY~jammy_amd64.deb
babelfish-18 6.2.0 u22.aarch64 pigsty 29.5 MiB babelfish-18_6.2.0-1PGSTY~jammy_arm64.deb
babelfish-18 6.2.0 u24.x86_64 pigsty 26.9 MiB babelfish-18_6.2.0-1PGSTY~noble_amd64.deb
babelfish-18 6.2.0 u24.aarch64 pigsty 26.6 MiB babelfish-18_6.2.0-1PGSTY~noble_arm64.deb
babelfish-18 6.2.0 u26.x86_64 pigsty 26.9 MiB babelfish-18_6.2.0-1PGSTY~resolute_amd64.deb
babelfish-18 6.2.0 u26.aarch64 pigsty 26.4 MiB babelfish-18_6.2.0-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
babelfish-17 5.7.0 el8.x86_64 pigsty 27.7 MiB babelfish-17-5.7.0-1PGSTY.el8.x86_64.rpm
babelfish-17 5.7.0 el8.aarch64 pigsty 27.1 MiB babelfish-17-5.7.0-1PGSTY.el8.aarch64.rpm
babelfish-17 5.7.0 el9.x86_64 pigsty 26.8 MiB babelfish-17-5.7.0-1PGSTY.el9.x86_64.rpm
babelfish-17 5.7.0 el9.aarch64 pigsty 26.5 MiB babelfish-17-5.7.0-1PGSTY.el9.aarch64.rpm
babelfish-17 5.7.0 el10.x86_64 pigsty 26.9 MiB babelfish-17-5.7.0-1PGSTY.el10.x86_64.rpm
babelfish-17 5.7.0 el10.aarch64 pigsty 26.6 MiB babelfish-17-5.7.0-1PGSTY.el10.aarch64.rpm
babelfish-17 5.7.0 d12.x86_64 pigsty 24.0 MiB babelfish-17_5.7.0-1PGSTY~bookworm_amd64.deb
babelfish-17 5.7.0 d12.aarch64 pigsty 23.3 MiB babelfish-17_5.7.0-1PGSTY~bookworm_arm64.deb
babelfish-17 5.7.0 d13.x86_64 pigsty 24.1 MiB babelfish-17_5.7.0-1PGSTY~trixie_amd64.deb
babelfish-17 5.7.0 d13.aarch64 pigsty 23.5 MiB babelfish-17_5.7.0-1PGSTY~trixie_arm64.deb
babelfish-17 5.7.0 u22.x86_64 pigsty 29.1 MiB babelfish-17_5.7.0-1PGSTY~jammy_amd64.deb
babelfish-17 5.7.0 u22.aarch64 pigsty 28.8 MiB babelfish-17_5.7.0-1PGSTY~jammy_arm64.deb
babelfish-17 5.7.0 u24.x86_64 pigsty 26.3 MiB babelfish-17_5.7.0-1PGSTY~noble_amd64.deb
babelfish-17 5.7.0 u24.aarch64 pigsty 25.9 MiB babelfish-17_5.7.0-1PGSTY~noble_arm64.deb
babelfish-17 5.7.0 u26.x86_64 pigsty 26.2 MiB babelfish-17_5.7.0-1PGSTY~resolute_amd64.deb
babelfish-17 5.7.0 u26.aarch64 pigsty 25.7 MiB babelfish-17_5.7.0-1PGSTY~resolute_arm64.deb

Source

babelfish-18-18.4-6.2.0.tar.gz babelfish-17-17.10-5.7.0.tar.gz

pig build pkg babelfish;		# build rpm/deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install this extension with pig:

pig install babelfish;		# install via package name, for the active PG version
pig install babelfishpg_common;		# install by extension name, for the current active PG version

pig install babelfishpg_common -v 18;   # install for PG 18
pig install babelfishpg_common -v 17;   # install for PG 17

Create this extension with:

CREATE EXTENSION babelfishpg_common;

Usage

babelfishpg_common: SQL Server Transact SQL Datatype Support

The babelfishpg_common extension provides SQL Server-compatible data type support for PostgreSQL as part of the Babelfish project. It enables PostgreSQL to understand and work with Microsoft SQL Server data types.

Enabling

CREATE EXTENSION babelfishpg_common;

SQL Server Data Types

The extension adds the following SQL Server-compatible data types:

  • TINYINT - 1-byte unsigned integer (0 to 255)
  • SMALLMONEY - Small monetary value
  • MONEY - Monetary value (see also babelfishpg_money)
  • DATETIME - SQL Server-style datetime
  • DATETIME2 - Extended precision datetime
  • SMALLDATETIME - Reduced precision datetime
  • DATETIMEOFFSET - Date and time with timezone offset
  • BIT - SQL Server-compatible boolean
  • NCHAR / NVARCHAR - Unicode character types
  • UNIQUEIDENTIFIER - SQL Server-style UUID
  • VARBINARY - Variable-length binary data
  • IMAGE - Legacy binary data type
  • SQL_VARIANT - Generic data type container
  • XML - SQL Server-compatible XML type
  • SYSNAME - System name type (nvarchar(128))

Key Features

  • Provides implicit and explicit type casting between SQL Server and PostgreSQL types
  • Supports SQL Server-style collation behavior
  • Handles SQL Server-specific type coercion rules
  • Works in conjunction with babelfishpg_tsql for full T-SQL compatibility

This extension is typically deployed as part of a full Babelfish for PostgreSQL installation and is a prerequisite for babelfishpg_tsql.