Skip to content

rdkit

Cheminformatics functionality for PostgreSQL.

rdkit · Cheminformatics functionality for PostgreSQL.

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
2930rdkitrdkit202609.3FEATBSD-3-ClauseC++
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--s-d-rNoYesNoYesyesno
SQL 4.8.0; legacy DEB 202303.3.

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXTPIGSTY202609.319 18 17 16 15rdkit-
RPMPIGSTY202609.319 18 17 16 15rdkit_$vrdkit
DEBPIGSTY202609.319 18 17 16 15postgresql-$v-rdkit-
Linux / PGPG19PG18PG17PG16PG15
el8.x86_64N/APIGSTY 202303.3PIGSTY 202303.3PIGSTY 202303.3PIGSTY 202303.3
el8.aarch64N/APIGSTY 202303.3PIGSTY 202303.3PIGSTY 202303.3PIGSTY 202303.3
el9.x86_64N/APIGSTY 202609.3PIGSTY 202609.3PIGSTY 202609.3PIGSTY 202609.3
el9.aarch64N/APIGSTY 202609.3PIGSTY 202609.3PIGSTY 202609.3PIGSTY 202609.3
el10.x86_64N/APIGSTY 202609.3PIGSTY 202609.3PIGSTY 202609.3PIGSTY 202609.3
el10.aarch64N/APIGSTY 202609.3PIGSTY 202609.3PIGSTY 202609.3PIGSTY 202609.3
d12.x86_64N/APIGSTY 202303.3PIGSTY 202303.3PGDG 202303.3PGDG 202303.3
d12.aarch64N/APIGSTY 202303.3PIGSTY 202303.3PGDG 202303.3PGDG 202303.3
d13.x86_64N/APIGSTY 202609.3PIGSTY 202609.3PIGSTY 202609.3PIGSTY 202609.3
d13.aarch64N/APIGSTY 202609.3PIGSTY 202609.3PIGSTY 202609.3PIGSTY 202609.3
u22.x86_64N/APIGSTY 202303.3PIGSTY 202303.3PGDG 202303.3PGDG 202303.3
u22.aarch64N/APIGSTY 202303.3PIGSTY 202303.3PGDG 202303.3PGDG 202303.3
u24.x86_64N/APIGSTY 202609.3PIGSTY 202609.3PIGSTY 202609.3PIGSTY 202609.3
u24.aarch64N/APIGSTY 202609.3PIGSTY 202609.3PIGSTY 202609.3PIGSTY 202609.3
u26.x86_64N/APIGSTY 202609.3PIGSTY 202609.3PIGSTY 202609.3PIGSTY 202609.3
u26.aarch64N/APIGSTY 202609.3PIGSTY 202609.3PIGSTY 202609.3PIGSTY 202609.3
PackageVersionOSORGSIZEFile URL
rdkit_18202303.3el8.x86_64pigsty165.8 KiBrdkit_18-202303.3-1PIGSTY.el8.x86_64.rpm
rdkit_18202303.3el8.aarch64pigsty158.8 KiBrdkit_18-202303.3-1PIGSTY.el8.aarch64.rpm
rdkit_18202609.3el9.x86_64pigsty132.0 KiBrdkit_18-202609.3-1PGSTY.el9.x86_64.rpm
rdkit_18202609.3el9.aarch64pigsty125.2 KiBrdkit_18-202609.3-1PGSTY.el9.aarch64.rpm
rdkit_18202609.3el10.x86_64pigsty140.2 KiBrdkit_18-202609.3-1PGSTY.el10.x86_64.rpm
rdkit_18202609.3el10.aarch64pigsty132.6 KiBrdkit_18-202609.3-1PGSTY.el10.aarch64.rpm
postgresql-18-rdkit202303.3d12.x86_64pigsty74.8 KiBpostgresql-18-rdkit_202303.3-1PGSTY~bookworm_amd64.deb
postgresql-18-rdkit202303.3d12.aarch64pigsty67.2 KiBpostgresql-18-rdkit_202303.3-1PGSTY~bookworm_arm64.deb
postgresql-18-rdkit202609.3d13.x86_64pigsty114.2 KiBpostgresql-18-rdkit_202609.3-1PGSTY~trixie_amd64.deb
postgresql-18-rdkit202503.1d13.x86_64pgdg245.1 KiBpostgresql-18-rdkit_202503.1-5.pgdg13+1_amd64.deb
postgresql-18-rdkit202609.3d13.aarch64pigsty104.7 KiBpostgresql-18-rdkit_202609.3-1PGSTY~trixie_arm64.deb
postgresql-18-rdkit202503.1d13.aarch64pgdg237.6 KiBpostgresql-18-rdkit_202503.1-5.pgdg13+1_arm64.deb
postgresql-18-rdkit202303.3u22.x86_64pigsty81.7 KiBpostgresql-18-rdkit_202303.3-1PGSTY~jammy_amd64.deb
postgresql-18-rdkit202303.3u22.aarch64pigsty77.2 KiBpostgresql-18-rdkit_202303.3-1PGSTY~jammy_arm64.deb
postgresql-18-rdkit202609.3u24.x86_64pigsty123.7 KiBpostgresql-18-rdkit_202609.3-1PGSTY~noble_amd64.deb
postgresql-18-rdkit202503.1u24.x86_64pgdg243.1 KiBpostgresql-18-rdkit_202503.1-5.pgdg24.04+1_amd64.deb
postgresql-18-rdkit202609.3u24.aarch64pigsty118.3 KiBpostgresql-18-rdkit_202609.3-1PGSTY~noble_arm64.deb
postgresql-18-rdkit202503.1u24.aarch64pgdg237.1 KiBpostgresql-18-rdkit_202503.1-5.pgdg24.04+1_arm64.deb
postgresql-18-rdkit202609.3u26.x86_64pigsty124.6 KiBpostgresql-18-rdkit_202609.3-1PGSTY~resolute_amd64.deb
postgresql-18-rdkit202609.3u26.aarch64pigsty119.9 KiBpostgresql-18-rdkit_202609.3-1PGSTY~resolute_arm64.deb
PackageVersionOSORGSIZEFile URL
rdkit_17202303.3el8.x86_64pigsty165.8 KiBrdkit_17-202303.3-1PIGSTY.el8.x86_64.rpm
rdkit_17202303.3el8.aarch64pigsty158.8 KiBrdkit_17-202303.3-1PIGSTY.el8.aarch64.rpm
rdkit_17202609.3el9.x86_64pigsty131.9 KiBrdkit_17-202609.3-1PGSTY.el9.x86_64.rpm
rdkit_17202609.3el9.aarch64pigsty125.2 KiBrdkit_17-202609.3-1PGSTY.el9.aarch64.rpm
rdkit_17202609.3el10.x86_64pigsty140.4 KiBrdkit_17-202609.3-1PGSTY.el10.x86_64.rpm
rdkit_17202609.3el10.aarch64pigsty132.5 KiBrdkit_17-202609.3-1PGSTY.el10.aarch64.rpm
postgresql-17-rdkit202303.3d12.x86_64pigsty74.6 KiBpostgresql-17-rdkit_202303.3-1PGSTY~bookworm_amd64.deb
postgresql-17-rdkit202303.3d12.aarch64pigsty67.1 KiBpostgresql-17-rdkit_202303.3-1PGSTY~bookworm_arm64.deb
postgresql-17-rdkit202609.3d13.x86_64pigsty113.9 KiBpostgresql-17-rdkit_202609.3-1PGSTY~trixie_amd64.deb
postgresql-17-rdkit202503.1d13.x86_64pgdg245.2 KiBpostgresql-17-rdkit_202503.1-5.pgdg13+1_amd64.deb
postgresql-17-rdkit202609.3d13.aarch64pigsty104.7 KiBpostgresql-17-rdkit_202609.3-1PGSTY~trixie_arm64.deb
postgresql-17-rdkit202503.1d13.aarch64pgdg237.5 KiBpostgresql-17-rdkit_202503.1-5.pgdg13+1_arm64.deb
postgresql-17-rdkit202303.3u22.x86_64pigsty81.7 KiBpostgresql-17-rdkit_202303.3-1PGSTY~jammy_amd64.deb
postgresql-17-rdkit202303.3u22.aarch64pigsty77.1 KiBpostgresql-17-rdkit_202303.3-1PGSTY~jammy_arm64.deb
postgresql-17-rdkit202609.3u24.x86_64pigsty124.0 KiBpostgresql-17-rdkit_202609.3-1PGSTY~noble_amd64.deb
postgresql-17-rdkit202503.1u24.x86_64pgdg243.1 KiBpostgresql-17-rdkit_202503.1-5.pgdg24.04+1_amd64.deb
postgresql-17-rdkit202609.3u24.aarch64pigsty120.3 KiBpostgresql-17-rdkit_202609.3-1PGSTY~noble_arm64.deb
postgresql-17-rdkit202503.1u24.aarch64pgdg237.2 KiBpostgresql-17-rdkit_202503.1-5.pgdg24.04+1_arm64.deb
postgresql-17-rdkit202609.3u26.x86_64pigsty124.6 KiBpostgresql-17-rdkit_202609.3-1PGSTY~resolute_amd64.deb
postgresql-17-rdkit202609.3u26.aarch64pigsty119.9 KiBpostgresql-17-rdkit_202609.3-1PGSTY~resolute_arm64.deb
PackageVersionOSORGSIZEFile URL
rdkit_16202303.3el8.x86_64pigsty165.8 KiBrdkit_16-202303.3-1PIGSTY.el8.x86_64.rpm
rdkit_16202303.3el8.aarch64pigsty158.7 KiBrdkit_16-202303.3-1PIGSTY.el8.aarch64.rpm
rdkit_16202609.3el9.x86_64pigsty132.0 KiBrdkit_16-202609.3-1PGSTY.el9.x86_64.rpm
rdkit_16202609.3el9.aarch64pigsty125.2 KiBrdkit_16-202609.3-1PGSTY.el9.aarch64.rpm
rdkit_16202609.3el10.x86_64pigsty140.6 KiBrdkit_16-202609.3-1PGSTY.el10.x86_64.rpm
rdkit_16202609.3el10.aarch64pigsty132.5 KiBrdkit_16-202609.3-1PGSTY.el10.aarch64.rpm
postgresql-16-rdkit202303.3d12.x86_64pgdg393.5 KiBpostgresql-16-rdkit_202303.3-3.pgdg120+1_amd64.deb
postgresql-16-rdkit202303.3d12.x86_64pigsty74.6 KiBpostgresql-16-rdkit_202303.3-3PIGSTY~legacy_amd64.deb
postgresql-16-rdkit202303.3d12.aarch64pgdg384.8 KiBpostgresql-16-rdkit_202303.3-3.pgdg120+1_arm64.deb
postgresql-16-rdkit202303.3d12.aarch64pigsty66.9 KiBpostgresql-16-rdkit_202303.3-3PIGSTY~legacy_arm64.deb
postgresql-16-rdkit202609.3d13.x86_64pigsty113.9 KiBpostgresql-16-rdkit_202609.3-1PGSTY~trixie_amd64.deb
postgresql-16-rdkit202503.1d13.x86_64pgdg245.2 KiBpostgresql-16-rdkit_202503.1-5.pgdg13+1_amd64.deb
postgresql-16-rdkit202609.3d13.aarch64pigsty104.6 KiBpostgresql-16-rdkit_202609.3-1PGSTY~trixie_arm64.deb
postgresql-16-rdkit202503.1d13.aarch64pgdg237.5 KiBpostgresql-16-rdkit_202503.1-5.pgdg13+1_arm64.deb
postgresql-16-rdkit202303.3u22.x86_64pgdg395.8 KiBpostgresql-16-rdkit_202303.3-3.pgdg22.04+1_amd64.deb
postgresql-16-rdkit202303.3u22.x86_64pigsty81.6 KiBpostgresql-16-rdkit_202303.3-3PIGSTY~legacy_amd64.deb
postgresql-16-rdkit202303.3u22.aarch64pgdg387.1 KiBpostgresql-16-rdkit_202303.3-3.pgdg22.04+1_arm64.deb
postgresql-16-rdkit202303.3u22.aarch64pigsty77.0 KiBpostgresql-16-rdkit_202303.3-3PIGSTY~legacy_arm64.deb
postgresql-16-rdkit202609.3u24.x86_64pigsty123.8 KiBpostgresql-16-rdkit_202609.3-1PGSTY~noble_amd64.deb
postgresql-16-rdkit202503.1u24.x86_64pgdg243.2 KiBpostgresql-16-rdkit_202503.1-5.pgdg24.04+1_amd64.deb
postgresql-16-rdkit202609.3u24.aarch64pigsty120.3 KiBpostgresql-16-rdkit_202609.3-1PGSTY~noble_arm64.deb
postgresql-16-rdkit202503.1u24.aarch64pgdg237.0 KiBpostgresql-16-rdkit_202503.1-5.pgdg24.04+1_arm64.deb
postgresql-16-rdkit202609.3u26.x86_64pigsty124.6 KiBpostgresql-16-rdkit_202609.3-1PGSTY~resolute_amd64.deb
postgresql-16-rdkit202609.3u26.aarch64pigsty119.8 KiBpostgresql-16-rdkit_202609.3-1PGSTY~resolute_arm64.deb
PackageVersionOSORGSIZEFile URL
rdkit_15202303.3el8.x86_64pigsty166.6 KiBrdkit_15-202303.3-1PIGSTY.el8.x86_64.rpm
rdkit_15202303.3el8.aarch64pigsty159.3 KiBrdkit_15-202303.3-1PIGSTY.el8.aarch64.rpm
rdkit_15202609.3el9.x86_64pigsty132.0 KiBrdkit_15-202609.3-1PGSTY.el9.x86_64.rpm
rdkit_15202609.3el9.aarch64pigsty125.2 KiBrdkit_15-202609.3-1PGSTY.el9.aarch64.rpm
rdkit_15202609.3el10.x86_64pigsty140.2 KiBrdkit_15-202609.3-1PGSTY.el10.x86_64.rpm
rdkit_15202609.3el10.aarch64pigsty132.5 KiBrdkit_15-202609.3-1PGSTY.el10.aarch64.rpm
postgresql-15-rdkit202303.3d12.x86_64pgdg394.5 KiBpostgresql-15-rdkit_202303.3-3.pgdg120+1_amd64.deb
postgresql-15-rdkit202303.3d12.x86_64pigsty75.5 KiBpostgresql-15-rdkit_202303.3-3PIGSTY~legacy_amd64.deb
postgresql-15-rdkit202303.3d12.aarch64pgdg385.2 KiBpostgresql-15-rdkit_202303.3-3.pgdg120+1_arm64.deb
postgresql-15-rdkit202303.3d12.aarch64pigsty67.8 KiBpostgresql-15-rdkit_202303.3-3PIGSTY~legacy_arm64.deb
postgresql-15-rdkit202609.3d13.x86_64pigsty113.9 KiBpostgresql-15-rdkit_202609.3-1PGSTY~trixie_amd64.deb
postgresql-15-rdkit202503.1d13.x86_64pgdg245.2 KiBpostgresql-15-rdkit_202503.1-5.pgdg13+1_amd64.deb
postgresql-15-rdkit202609.3d13.aarch64pigsty104.8 KiBpostgresql-15-rdkit_202609.3-1PGSTY~trixie_arm64.deb
postgresql-15-rdkit202503.1d13.aarch64pgdg237.5 KiBpostgresql-15-rdkit_202503.1-5.pgdg13+1_arm64.deb
postgresql-15-rdkit202303.3u22.x86_64pgdg395.8 KiBpostgresql-15-rdkit_202303.3-3.pgdg22.04+1_amd64.deb
postgresql-15-rdkit202303.3u22.x86_64pigsty82.2 KiBpostgresql-15-rdkit_202303.3-3PIGSTY~legacy_amd64.deb
postgresql-15-rdkit202303.3u22.aarch64pgdg387.0 KiBpostgresql-15-rdkit_202303.3-3.pgdg22.04+1_arm64.deb
postgresql-15-rdkit202303.3u22.aarch64pigsty77.1 KiBpostgresql-15-rdkit_202303.3-3PIGSTY~legacy_arm64.deb
postgresql-15-rdkit202609.3u24.x86_64pigsty123.6 KiBpostgresql-15-rdkit_202609.3-1PGSTY~noble_amd64.deb
postgresql-15-rdkit202503.1u24.x86_64pgdg243.1 KiBpostgresql-15-rdkit_202503.1-5.pgdg24.04+1_amd64.deb
postgresql-15-rdkit202609.3u24.aarch64pigsty118.3 KiBpostgresql-15-rdkit_202609.3-1PGSTY~noble_arm64.deb
postgresql-15-rdkit202503.1u24.aarch64pgdg237.0 KiBpostgresql-15-rdkit_202503.1-5.pgdg24.04+1_arm64.deb
postgresql-15-rdkit202609.3u26.x86_64pigsty124.6 KiBpostgresql-15-rdkit_202609.3-1PGSTY~resolute_amd64.deb
postgresql-15-rdkit202609.3u26.aarch64pigsty119.8 KiBpostgresql-15-rdkit_202609.3-1PGSTY~resolute_arm64.deb

Source

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

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

Create this extension with:

CREATE EXTENSION rdkit;

Usage

Sources:

rdkit provides molecular types, substructure search, fingerprints and chemical descriptors. This page follows the PostgreSQL cartridge shipped in RDKit 2026.03.6.

Create The Extension

CREATE EXTENSION rdkit;

The cartridge adds chemistry-specific types including mol, bfp, and sfp.

Core Search Operators

The cartridge documentation covers:

  • @> and <@ for substructure matching.
  • @= for exact molecular equality.
  • %, <%>, and <#> style fingerprint similarity and KNN operators for similarity search.

These are typically combined with GiST indexes over fingerprint columns.

Fingerprints And Similarity

Common fingerprint functions documented for SQL usage include morgan_fp, morganbv_fp, featmorgan_fp, rdkit_fp, atompair_fp, torsion_fp, layered_fp, and maccs_fp.

Example from the cartridge docs:

SELECT tanimoto_sml(
  morganbv_fp('c1ccccc1'::mol),
  morganbv_fp('c1ccccc1O'::mol)
);

Descriptors And Validation

The cartridge docs also expose validation and descriptor helpers such as:

  • is_valid_smiles()
  • is_valid_ctab()
  • is_valid_smarts()
  • mol_amw()
  • mol_hba()
  • mol_numrings()

These functions are the main user-facing surface for SQL analytics on molecular structures.

Version and Upgrade Boundary

The RDKit toolkit release 2026.03.6 contains SQL extension version 4.8.0; these are different version namespaces. The upstream 4.7.0 to 4.8.0 SQL template changes function costs, but its fmcs_smiles statement has a line comment that swallows the cost clause and terminator. Do not assume an unpatched ALTER EXTENSION rdkit UPDATE path works: verify the installed upgrade script and test the update on a restored copy first. A packaging patch is distinct from the upstream source.

Table reader