plllvm
plllvm · Untrusted LLVM IR procedural language and experimental PL/pgSQL JIT.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 102314 | plllvm | plllvm | 0.3 | LANG | PostgreSQL | C |
Usage
Sources:
plllvm 0.3 runs untrusted LLVM IR as PostgreSQL functions and includes an experimental PL/pgSQL JIT language.
Core Workflow
Functions compile separately in each backend. The entry point returns a PostgreSQL Datum, and non-strict functions must handle nulls explicitly. plpgsql_jit accepts supported PL/pgSQL bodies; plllvm.opt_level and plllvm.auto_checks govern compilation and inserted safety checks. The LLVM IR language has no DO handler.
Operational Boundaries
Only the documented PostgreSQL 20devel/LLVM 22.1.8/macOS arm64 baseline is tested. Match the server’s LLVM shared library. Installation and language functions require superuser authority; native IR has no memory sandbox and can crash or corrupt the backend. Optional expression hooks need explicit loading. No in-place extension upgrade is supplied; preserve dependent functions before following any replacement procedure.