Skip to content

db2fce

DB2 compatibility functions, types, operators, and SYSIBM.SYSDUMMY1 for PostgreSQL.

db2fce · DB2 compatibility functions, types, operators, and SYSIBM.SYSDUMMY1 for PostgreSQL.

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
9200db2fcedb2fce0.0.17SIMPostgreSQLSQL
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
----d--NoNoNoYesnono
PGDG APT is complete for PG14-18; Pigsty RPM noarch spec fills the PGDG YUM gap for PG14-18.

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXTMIXED0.0.1719 18 17 16 15db2fceplpgsql
RPMPIGSTY0.0.1719 18 17 16 15db2fce_$v-
DEBPGDG0.0.1719 18 17 16 15postgresql-$v-db2fce-
Linux / PGPG19PG18PG17PG16PG15
el8.x86_64N/APIGSTY 0.0.17PIGSTY 0.0.17PIGSTY 0.0.17PIGSTY 0.0.17
el8.aarch64N/APIGSTY 0.0.17PIGSTY 0.0.17PIGSTY 0.0.17PIGSTY 0.0.17
el9.x86_64PIGSTY 0.0.17PIGSTY 0.0.17PIGSTY 0.0.17PIGSTY 0.0.17PIGSTY 0.0.17
el9.aarch64PIGSTY 0.0.17PIGSTY 0.0.17PIGSTY 0.0.17PIGSTY 0.0.17PIGSTY 0.0.17
el10.x86_64PIGSTY 0.0.17PIGSTY 0.0.17PIGSTY 0.0.17PIGSTY 0.0.17PIGSTY 0.0.17
el10.aarch64PIGSTY 0.0.17PIGSTY 0.0.17PIGSTY 0.0.17PIGSTY 0.0.17PIGSTY 0.0.17
d12.x86_64PIGSTY 0.0.17PGDG 0.0.17PGDG 0.0.17PGDG 0.0.17PGDG 0.0.17
d12.aarch64PIGSTY 0.0.17PGDG 0.0.17PGDG 0.0.17PGDG 0.0.17PGDG 0.0.17
d13.x86_64PIGSTY 0.0.17PGDG 0.0.17PGDG 0.0.17PGDG 0.0.17PGDG 0.0.17
d13.aarch64PIGSTY 0.0.17PGDG 0.0.17PGDG 0.0.17PGDG 0.0.17PGDG 0.0.17
u22.x86_64PIGSTY 0.0.17PGDG 0.0.17PGDG 0.0.17PGDG 0.0.17PGDG 0.0.17
u22.aarch64PIGSTY 0.0.17PGDG 0.0.17PGDG 0.0.17PGDG 0.0.17PGDG 0.0.17
u24.x86_64PIGSTY 0.0.17PGDG 0.0.17PGDG 0.0.17PGDG 0.0.17PGDG 0.0.17
u24.aarch64PIGSTY 0.0.17PGDG 0.0.17PGDG 0.0.17PGDG 0.0.17PGDG 0.0.17
u26.x86_64PIGSTY 0.0.17PGDG 0.0.17PGDG 0.0.17PGDG 0.0.17PGDG 0.0.17
u26.aarch64PIGSTY 0.0.17PGDG 0.0.17PGDG 0.0.17PGDG 0.0.17PGDG 0.0.17
PackageVersionOSORGSIZEFile URL
db2fce_190.0.17el9.x86_64pigsty17.4 KiBdb2fce_19-0.0.17-1PGSTY.el9.noarch.rpm
db2fce_190.0.17el9.aarch64pigsty17.4 KiBdb2fce_19-0.0.17-1PGSTY.el9.noarch.rpm
db2fce_190.0.17el10.x86_64pigsty17.5 KiBdb2fce_19-0.0.17-1PGSTY.el10.noarch.rpm
db2fce_190.0.17el10.aarch64pigsty17.5 KiBdb2fce_19-0.0.17-1PGSTY.el10.noarch.rpm
postgresql-19-db2fce0.0.17d12.x86_64pigsty9.0 KiBpostgresql-19-db2fce_0.0.17-1PGSTY~bookworm_all.deb
postgresql-19-db2fce0.0.17d12.aarch64pigsty9.0 KiBpostgresql-19-db2fce_0.0.17-1PGSTY~bookworm_all.deb
postgresql-19-db2fce0.0.17d13.x86_64pigsty9.0 KiBpostgresql-19-db2fce_0.0.17-1PGSTY~trixie_all.deb
postgresql-19-db2fce0.0.17d13.aarch64pigsty9.0 KiBpostgresql-19-db2fce_0.0.17-1PGSTY~trixie_all.deb
postgresql-19-db2fce0.0.17u22.x86_64pigsty9.1 KiBpostgresql-19-db2fce_0.0.17-1PGSTY~jammy_all.deb
postgresql-19-db2fce0.0.17u22.aarch64pigsty9.1 KiBpostgresql-19-db2fce_0.0.17-1PGSTY~jammy_all.deb
postgresql-19-db2fce0.0.17u24.x86_64pigsty9.1 KiBpostgresql-19-db2fce_0.0.17-1PGSTY~noble_all.deb
postgresql-19-db2fce0.0.17u24.aarch64pigsty9.1 KiBpostgresql-19-db2fce_0.0.17-1PGSTY~noble_all.deb
postgresql-19-db2fce0.0.17u26.x86_64pigsty9.1 KiBpostgresql-19-db2fce_0.0.17-1PGSTY~resolute_all.deb
postgresql-19-db2fce0.0.17u26.aarch64pigsty9.1 KiBpostgresql-19-db2fce_0.0.17-1PGSTY~resolute_all.deb
PackageVersionOSORGSIZEFile URL
db2fce_180.0.17el8.x86_64pigsty17.5 KiBdb2fce_18-0.0.17-1PGSTY.el8.noarch.rpm
db2fce_180.0.17el8.aarch64pigsty17.5 KiBdb2fce_18-0.0.17-1PGSTY.el8.noarch.rpm
db2fce_180.0.17el9.x86_64pigsty17.4 KiBdb2fce_18-0.0.17-1PGSTY.el9.noarch.rpm
db2fce_180.0.17el9.aarch64pigsty17.4 KiBdb2fce_18-0.0.17-1PGSTY.el9.noarch.rpm
db2fce_180.0.17el10.x86_64pigsty17.5 KiBdb2fce_18-0.0.17-1PGSTY.el10.noarch.rpm
db2fce_180.0.17el10.aarch64pigsty17.5 KiBdb2fce_18-0.0.17-1PGSTY.el10.noarch.rpm
postgresql-18-db2fce0.0.17d12.x86_64pgdg8.3 KiBpostgresql-18-db2fce_0.0.17-1.pgdg12+2_all.deb
postgresql-18-db2fce0.0.17d12.x86_64pgdg8.3 KiBpostgresql-18-db2fce_0.0.17-1.pgdg12+1_all.deb
postgresql-18-db2fce0.0.17d12.aarch64pgdg8.3 KiBpostgresql-18-db2fce_0.0.17-1.pgdg12+2_all.deb
postgresql-18-db2fce0.0.17d12.aarch64pgdg8.3 KiBpostgresql-18-db2fce_0.0.17-1.pgdg12+1_all.deb
postgresql-18-db2fce0.0.17d13.x86_64pgdg8.3 KiBpostgresql-18-db2fce_0.0.17-1.pgdg13+2_all.deb
postgresql-18-db2fce0.0.17d13.x86_64pgdg8.3 KiBpostgresql-18-db2fce_0.0.17-1.pgdg13+1_all.deb
postgresql-18-db2fce0.0.17d13.aarch64pgdg8.3 KiBpostgresql-18-db2fce_0.0.17-1.pgdg13+2_all.deb
postgresql-18-db2fce0.0.17d13.aarch64pgdg8.3 KiBpostgresql-18-db2fce_0.0.17-1.pgdg13+1_all.deb
postgresql-18-db2fce0.0.17u22.x86_64pgdg8.3 KiBpostgresql-18-db2fce_0.0.17-1.pgdg22.04+2_all.deb
postgresql-18-db2fce0.0.17u22.x86_64pgdg8.3 KiBpostgresql-18-db2fce_0.0.17-1.pgdg22.04+1_all.deb
postgresql-18-db2fce0.0.17u22.aarch64pgdg8.3 KiBpostgresql-18-db2fce_0.0.17-1.pgdg22.04+2_all.deb
postgresql-18-db2fce0.0.17u22.aarch64pgdg8.3 KiBpostgresql-18-db2fce_0.0.17-1.pgdg22.04+1_all.deb
postgresql-18-db2fce0.0.17u24.x86_64pgdg8.3 KiBpostgresql-18-db2fce_0.0.17-1.pgdg24.04+2_all.deb
postgresql-18-db2fce0.0.17u24.x86_64pgdg8.3 KiBpostgresql-18-db2fce_0.0.17-1.pgdg24.04+1_all.deb
postgresql-18-db2fce0.0.17u24.aarch64pgdg8.3 KiBpostgresql-18-db2fce_0.0.17-1.pgdg24.04+2_all.deb
postgresql-18-db2fce0.0.17u24.aarch64pgdg8.3 KiBpostgresql-18-db2fce_0.0.17-1.pgdg24.04+1_all.deb
postgresql-18-db2fce0.0.17u26.x86_64pgdg8.3 KiBpostgresql-18-db2fce_0.0.17-1.pgdg26.04+2_all.deb
postgresql-18-db2fce0.0.17u26.x86_64pgdg8.3 KiBpostgresql-18-db2fce_0.0.17-1.pgdg26.04+1_all.deb
postgresql-18-db2fce0.0.17u26.aarch64pgdg8.3 KiBpostgresql-18-db2fce_0.0.17-1.pgdg26.04+2_all.deb
postgresql-18-db2fce0.0.17u26.aarch64pgdg8.3 KiBpostgresql-18-db2fce_0.0.17-1.pgdg26.04+1_all.deb
PackageVersionOSORGSIZEFile URL
db2fce_170.0.17el8.x86_64pigsty17.5 KiBdb2fce_17-0.0.17-1PGSTY.el8.noarch.rpm
db2fce_170.0.17el8.aarch64pigsty17.5 KiBdb2fce_17-0.0.17-1PGSTY.el8.noarch.rpm
db2fce_170.0.17el9.x86_64pigsty17.4 KiBdb2fce_17-0.0.17-1PGSTY.el9.noarch.rpm
db2fce_170.0.17el9.aarch64pigsty17.4 KiBdb2fce_17-0.0.17-1PGSTY.el9.noarch.rpm
db2fce_170.0.17el10.x86_64pigsty17.5 KiBdb2fce_17-0.0.17-1PGSTY.el10.noarch.rpm
db2fce_170.0.17el10.aarch64pigsty17.5 KiBdb2fce_17-0.0.17-1PGSTY.el10.noarch.rpm
postgresql-17-db2fce0.0.17d12.x86_64pgdg8.3 KiBpostgresql-17-db2fce_0.0.17-1.pgdg12+2_all.deb
postgresql-17-db2fce0.0.17d12.x86_64pgdg8.3 KiBpostgresql-17-db2fce_0.0.17-1.pgdg12+1_all.deb
postgresql-17-db2fce0.0.17d12.aarch64pgdg8.3 KiBpostgresql-17-db2fce_0.0.17-1.pgdg12+2_all.deb
postgresql-17-db2fce0.0.17d12.aarch64pgdg8.3 KiBpostgresql-17-db2fce_0.0.17-1.pgdg12+1_all.deb
postgresql-17-db2fce0.0.17d13.x86_64pgdg8.3 KiBpostgresql-17-db2fce_0.0.17-1.pgdg13+2_all.deb
postgresql-17-db2fce0.0.17d13.x86_64pgdg8.3 KiBpostgresql-17-db2fce_0.0.17-1.pgdg13+1_all.deb
postgresql-17-db2fce0.0.17d13.aarch64pgdg8.3 KiBpostgresql-17-db2fce_0.0.17-1.pgdg13+2_all.deb
postgresql-17-db2fce0.0.17d13.aarch64pgdg8.3 KiBpostgresql-17-db2fce_0.0.17-1.pgdg13+1_all.deb
postgresql-17-db2fce0.0.17u22.x86_64pgdg8.3 KiBpostgresql-17-db2fce_0.0.17-1.pgdg22.04+2_all.deb
postgresql-17-db2fce0.0.17u22.x86_64pgdg8.3 KiBpostgresql-17-db2fce_0.0.17-1.pgdg22.04+1_all.deb
postgresql-17-db2fce0.0.17u22.aarch64pgdg8.3 KiBpostgresql-17-db2fce_0.0.17-1.pgdg22.04+2_all.deb
postgresql-17-db2fce0.0.17u22.aarch64pgdg8.3 KiBpostgresql-17-db2fce_0.0.17-1.pgdg22.04+1_all.deb
postgresql-17-db2fce0.0.17u24.x86_64pgdg8.3 KiBpostgresql-17-db2fce_0.0.17-1.pgdg24.04+2_all.deb
postgresql-17-db2fce0.0.17u24.x86_64pgdg8.3 KiBpostgresql-17-db2fce_0.0.17-1.pgdg24.04+1_all.deb
postgresql-17-db2fce0.0.17u24.aarch64pgdg8.3 KiBpostgresql-17-db2fce_0.0.17-1.pgdg24.04+2_all.deb
postgresql-17-db2fce0.0.17u24.aarch64pgdg8.3 KiBpostgresql-17-db2fce_0.0.17-1.pgdg24.04+1_all.deb
postgresql-17-db2fce0.0.17u26.x86_64pgdg8.3 KiBpostgresql-17-db2fce_0.0.17-1.pgdg26.04+2_all.deb
postgresql-17-db2fce0.0.17u26.x86_64pgdg8.3 KiBpostgresql-17-db2fce_0.0.17-1.pgdg26.04+1_all.deb
postgresql-17-db2fce0.0.17u26.aarch64pgdg8.3 KiBpostgresql-17-db2fce_0.0.17-1.pgdg26.04+2_all.deb
postgresql-17-db2fce0.0.17u26.aarch64pgdg8.3 KiBpostgresql-17-db2fce_0.0.17-1.pgdg26.04+1_all.deb
PackageVersionOSORGSIZEFile URL
db2fce_160.0.17el8.x86_64pigsty17.5 KiBdb2fce_16-0.0.17-1PGSTY.el8.noarch.rpm
db2fce_160.0.17el8.aarch64pigsty17.5 KiBdb2fce_16-0.0.17-1PGSTY.el8.noarch.rpm
db2fce_160.0.17el9.x86_64pigsty17.4 KiBdb2fce_16-0.0.17-1PGSTY.el9.noarch.rpm
db2fce_160.0.17el9.aarch64pigsty17.4 KiBdb2fce_16-0.0.17-1PGSTY.el9.noarch.rpm
db2fce_160.0.17el10.x86_64pigsty17.5 KiBdb2fce_16-0.0.17-1PGSTY.el10.noarch.rpm
db2fce_160.0.17el10.aarch64pigsty17.5 KiBdb2fce_16-0.0.17-1PGSTY.el10.noarch.rpm
postgresql-16-db2fce0.0.17d12.x86_64pgdg8.3 KiBpostgresql-16-db2fce_0.0.17-1.pgdg12+2_all.deb
postgresql-16-db2fce0.0.17d12.x86_64pgdg8.3 KiBpostgresql-16-db2fce_0.0.17-1.pgdg12+1_all.deb
postgresql-16-db2fce0.0.17d12.aarch64pgdg8.3 KiBpostgresql-16-db2fce_0.0.17-1.pgdg12+2_all.deb
postgresql-16-db2fce0.0.17d12.aarch64pgdg8.3 KiBpostgresql-16-db2fce_0.0.17-1.pgdg12+1_all.deb
postgresql-16-db2fce0.0.17d13.x86_64pgdg8.3 KiBpostgresql-16-db2fce_0.0.17-1.pgdg13+2_all.deb
postgresql-16-db2fce0.0.17d13.x86_64pgdg8.3 KiBpostgresql-16-db2fce_0.0.17-1.pgdg13+1_all.deb
postgresql-16-db2fce0.0.17d13.aarch64pgdg8.3 KiBpostgresql-16-db2fce_0.0.17-1.pgdg13+2_all.deb
postgresql-16-db2fce0.0.17d13.aarch64pgdg8.3 KiBpostgresql-16-db2fce_0.0.17-1.pgdg13+1_all.deb
postgresql-16-db2fce0.0.17u22.x86_64pgdg8.3 KiBpostgresql-16-db2fce_0.0.17-1.pgdg22.04+2_all.deb
postgresql-16-db2fce0.0.17u22.x86_64pgdg8.3 KiBpostgresql-16-db2fce_0.0.17-1.pgdg22.04+1_all.deb
postgresql-16-db2fce0.0.17u22.aarch64pgdg8.3 KiBpostgresql-16-db2fce_0.0.17-1.pgdg22.04+2_all.deb
postgresql-16-db2fce0.0.17u22.aarch64pgdg8.3 KiBpostgresql-16-db2fce_0.0.17-1.pgdg22.04+1_all.deb
postgresql-16-db2fce0.0.17u24.x86_64pgdg8.3 KiBpostgresql-16-db2fce_0.0.17-1.pgdg24.04+2_all.deb
postgresql-16-db2fce0.0.17u24.x86_64pgdg8.3 KiBpostgresql-16-db2fce_0.0.17-1.pgdg24.04+1_all.deb
postgresql-16-db2fce0.0.17u24.aarch64pgdg8.3 KiBpostgresql-16-db2fce_0.0.17-1.pgdg24.04+2_all.deb
postgresql-16-db2fce0.0.17u24.aarch64pgdg8.3 KiBpostgresql-16-db2fce_0.0.17-1.pgdg24.04+1_all.deb
postgresql-16-db2fce0.0.17u26.x86_64pgdg8.3 KiBpostgresql-16-db2fce_0.0.17-1.pgdg26.04+2_all.deb
postgresql-16-db2fce0.0.17u26.x86_64pgdg8.3 KiBpostgresql-16-db2fce_0.0.17-1.pgdg26.04+1_all.deb
postgresql-16-db2fce0.0.17u26.aarch64pgdg8.3 KiBpostgresql-16-db2fce_0.0.17-1.pgdg26.04+2_all.deb
postgresql-16-db2fce0.0.17u26.aarch64pgdg8.3 KiBpostgresql-16-db2fce_0.0.17-1.pgdg26.04+1_all.deb
PackageVersionOSORGSIZEFile URL
db2fce_150.0.17el8.x86_64pigsty17.5 KiBdb2fce_15-0.0.17-1PGSTY.el8.noarch.rpm
db2fce_150.0.17el8.aarch64pigsty17.5 KiBdb2fce_15-0.0.17-1PGSTY.el8.noarch.rpm
db2fce_150.0.17el9.x86_64pigsty17.4 KiBdb2fce_15-0.0.17-1PGSTY.el9.noarch.rpm
db2fce_150.0.17el9.aarch64pigsty17.4 KiBdb2fce_15-0.0.17-1PGSTY.el9.noarch.rpm
db2fce_150.0.17el10.x86_64pigsty17.5 KiBdb2fce_15-0.0.17-1PGSTY.el10.noarch.rpm
db2fce_150.0.17el10.aarch64pigsty17.5 KiBdb2fce_15-0.0.17-1PGSTY.el10.noarch.rpm
postgresql-15-db2fce0.0.17d12.x86_64pgdg8.3 KiBpostgresql-15-db2fce_0.0.17-1.pgdg12+2_all.deb
postgresql-15-db2fce0.0.17d12.x86_64pgdg8.3 KiBpostgresql-15-db2fce_0.0.17-1.pgdg12+1_all.deb
postgresql-15-db2fce0.0.17d12.aarch64pgdg8.3 KiBpostgresql-15-db2fce_0.0.17-1.pgdg12+2_all.deb
postgresql-15-db2fce0.0.17d12.aarch64pgdg8.3 KiBpostgresql-15-db2fce_0.0.17-1.pgdg12+1_all.deb
postgresql-15-db2fce0.0.17d13.x86_64pgdg8.3 KiBpostgresql-15-db2fce_0.0.17-1.pgdg13+2_all.deb
postgresql-15-db2fce0.0.17d13.x86_64pgdg8.3 KiBpostgresql-15-db2fce_0.0.17-1.pgdg13+1_all.deb
postgresql-15-db2fce0.0.17d13.aarch64pgdg8.3 KiBpostgresql-15-db2fce_0.0.17-1.pgdg13+2_all.deb
postgresql-15-db2fce0.0.17d13.aarch64pgdg8.3 KiBpostgresql-15-db2fce_0.0.17-1.pgdg13+1_all.deb
postgresql-15-db2fce0.0.17u22.x86_64pgdg8.3 KiBpostgresql-15-db2fce_0.0.17-1.pgdg22.04+2_all.deb
postgresql-15-db2fce0.0.17u22.x86_64pgdg8.3 KiBpostgresql-15-db2fce_0.0.17-1.pgdg22.04+1_all.deb
postgresql-15-db2fce0.0.17u22.aarch64pgdg8.3 KiBpostgresql-15-db2fce_0.0.17-1.pgdg22.04+2_all.deb
postgresql-15-db2fce0.0.17u22.aarch64pgdg8.3 KiBpostgresql-15-db2fce_0.0.17-1.pgdg22.04+1_all.deb
postgresql-15-db2fce0.0.17u24.x86_64pgdg8.3 KiBpostgresql-15-db2fce_0.0.17-1.pgdg24.04+2_all.deb
postgresql-15-db2fce0.0.17u24.x86_64pgdg8.3 KiBpostgresql-15-db2fce_0.0.17-1.pgdg24.04+1_all.deb
postgresql-15-db2fce0.0.17u24.aarch64pgdg8.3 KiBpostgresql-15-db2fce_0.0.17-1.pgdg24.04+2_all.deb
postgresql-15-db2fce0.0.17u24.aarch64pgdg8.3 KiBpostgresql-15-db2fce_0.0.17-1.pgdg24.04+1_all.deb
postgresql-15-db2fce0.0.17u26.x86_64pgdg8.3 KiBpostgresql-15-db2fce_0.0.17-1.pgdg26.04+2_all.deb
postgresql-15-db2fce0.0.17u26.x86_64pgdg8.3 KiBpostgresql-15-db2fce_0.0.17-1.pgdg26.04+1_all.deb
postgresql-15-db2fce0.0.17u26.aarch64pgdg8.3 KiBpostgresql-15-db2fce_0.0.17-1.pgdg26.04+2_all.deb
postgresql-15-db2fce0.0.17u26.aarch64pgdg8.3 KiBpostgresql-15-db2fce_0.0.17-1.pgdg26.04+1_all.deb

Source

pig build pkg db2fce;		# 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 db2fce;		# install by package name

pig install db2fce -v 19;   # install for PG 19
pig install db2fce -v 18;   # install for PG 18
pig install db2fce -v 17;   # install for PG 17
pig install db2fce -v 16;   # install for PG 16
pig install db2fce -v 15;   # install for PG 15

Create this extension with:

CREATE EXTENSION db2fce CASCADE; -- requires plpgsql

Usage

Sources: README, SQL objects, control file

db2fce provides a DB2 compatibility environment for PostgreSQL. It creates DB2-style functions, types, operators, and the SYSIBM.SYSDUMMY1 compatibility view so SQL originally written for IBM Db2 can be adapted with fewer changes.

Enable

CREATE EXTENSION db2fce;

SET search_path = db2, sysibm, public;

The extension creates most compatibility objects in the db2 schema and creates sysibm.sysdummy1 for DB2 queries that expect a dummy single-row table.

SELECT * FROM sysibm.sysdummy1;

Compatibility Functions

The db2 schema includes date/time helpers such as microsecond, second, minute, hour, day, month, year, days, months_between, date, time, and timestamp_format.

String and conversion helpers include locate, translate, lcase, upper, lower, strip, char, integer, int, double, decimal, dec, hex, round, digits, and value.

Operators

The SQL layer also defines DB2-style operators such as ^= for inequality and !! for concatenation across several data types.

SELECT db2.int('42');
SELECT db2.days(current_date);
SELECT 'db' !! '2';

Notes

Adding db2 to search_path lets many DB2 function calls work without schema qualification. Some names that conflict with PostgreSQL syntax or built-in behavior may still need explicit db2. qualification.

Table reader