PL/Rust: Native Performance for PostgreSQL Functions in Rust
2025-02-02
PL/Rust is a loadable procedural language enabling PostgreSQL function development in Rust, compiling to native machine code for optimal performance. Unlike interpreted alternatives, it leverages Rust's ecosystem and compile-time safety. It provides access to Postgres' SPI (including dynamic queries and prepared statements), safe Rust types for most Postgres data types, and support for trigger functions. On x86_64 and aarch64 Linux, it operates as a 'trusted' language, offering enhanced security guarantees; elsewhere, it functions as 'untrusted'. Comprehensive documentation, installation instructions, and cross-compilation support are available.
Development