Skip to content

pg_tle

Trusted Language Extensions for PostgreSQL

Overview

PackageVersionCategoryLicenseLanguage
pg_tle1.5.3LANGApache-2.0C
IDExtensionBinLibLoadCreateTrustRelocSchema
3000pg_tleNoYesYesYesNoNopgtle

Maintained RPM/DEB recipes and source are 1.5.3; flex required to build. Preload/restart required. Local indexed matrix on 2026-10-10 has RPM 1.5.3 and DEB 1.5.2; publication is checked separately.

Version

TypeRepoVersionPG VerPackageDeps
EXTPIGSTY1.5.31817161514pg_tle-
RPMPIGSTY1.5.31817161514pg_tle_$v-
DEBPIGSTY1.5.31817161514postgresql-$v-pg-tle-
OS / PGPG18PG17PG16PG15PG14
el8.x86_64
el8.aarch64
el9.x86_64
el9.aarch64
el10.x86_64
el10.aarch64
d12.x86_64
d12.aarch64
d13.x86_64
d13.aarch64
u22.x86_64
u22.aarch64
PIGSTY 1.5.2
PIGSTY 1.5.2
PIGSTY 1.5.2
PIGSTY 1.5.2
PIGSTY 1.5.2
u24.x86_64
u24.aarch64
PIGSTY 1.5.2
PIGSTY 1.5.2
PIGSTY 1.5.2
PIGSTY 1.5.2
PIGSTY 1.5.2
u26.x86_64
u26.aarch64

Build

You can build the RPM / DEB packages for pg_tle using pig build:

pig build pkg pg_tle         # build RPM / DEB packages

Install

You can install pg_tle 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:

Install
pig install pg_tle;          # Install for current active PG version
pig
pig ext install -y pg_tle -v 18  # PG 18
pig ext install -y pg_tle -v 17  # PG 17
pig ext install -y pg_tle -v 16  # PG 16
pig ext install -y pg_tle -v 15  # PG 15
pig ext install -y pg_tle -v 14  # PG 14
dnf
dnf install -y pg_tle_18       # PG 18
dnf install -y pg_tle_17       # PG 17
dnf install -y pg_tle_16       # PG 16
dnf install -y pg_tle_15       # PG 15
dnf install -y pg_tle_14       # PG 14
apt
apt install -y postgresql-18-pg-tle   # PG 18
apt install -y postgresql-17-pg-tle   # PG 17
apt install -y postgresql-16-pg-tle   # PG 16
apt install -y postgresql-15-pg-tle   # PG 15
apt install -y postgresql-14-pg-tle   # PG 14

Preload:

shared_preload_libraries = 'pg_tle';

Create Extension:

CREATE EXTENSION pg_tle;

Usage

Sources:

pg_tle 1.5.3 manages extensions written in trusted PostgreSQL languages. Native installation needs shared preload and a server restart; subsequent TLE definitions are stored in the database. Upstream documents PostgreSQL 12 through 19 Beta 4.

Core Workflow

shared_preload_libraries = 'pg_tle'
CREATE EXTENSION pg_tle;
SELECT pgtle.available_extensions();

Operational Boundaries

pgtle.install_extension() stores an extension definition; CREATE EXTENSION enables it in a database. pgtle.install_update_path() and pgtle.set_default_version() manage versions, while pgtle.available_extensions() lists definitions. pgtle.set_extension_schema() sets schema metadata for a managed extension in 1.5.3, which also tightens identifier validation. TLE administration is restricted through pgtle_admin; executing an installed extension still follows PostgreSQL language and object privileges. Dropping an installed extension and uninstalling its TLE definition are separate operations. Only use trusted extension code and review dependencies and upgrade SQL.

Was this page helpful?