plluau
Lua as an untrusted procedural language
pllua : Lua as an untrusted procedural language
Overview
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-- | No | Yes | No | Yes | no | no |
| Relationships | |
|---|---|
| Schemas | pg_catalog |
| Need By | hstore_plluau |
| See Also | plperlu plpython3u pltclu plperl plv8 pljs pljava plsh plr plxslt |
| Siblings | pllua hstore_pllua hstore_plluau |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | MIXED | 2.0.12 |
18 17 16 15 14 | pllua |
- |
| RPM | PIGSTY | 2.0.12 |
18 17 16 15 14 | pllua_$v |
- |
| DEB | PGDG | 2.0.12 |
18 17 16 15 14 | postgresql-$v-pllua |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 2.0.12 | PIGSTY 2.0.12 | PIGSTY 2.0.12 | PIGSTY 2.0.12 | PIGSTY 2.0.12 |
| el8.aarch64 | PIGSTY 2.0.12 | PIGSTY 2.0.12 | PIGSTY 2.0.12 | PIGSTY 2.0.12 | PIGSTY 2.0.12 |
| el9.x86_64 | PIGSTY 2.0.12 | PIGSTY 2.0.12 | PIGSTY 2.0.12 | PIGSTY 2.0.12 | PIGSTY 2.0.12 |
| el9.aarch64 | PIGSTY 2.0.12 | PIGSTY 2.0.12 | PIGSTY 2.0.12 | PIGSTY 2.0.12 | PIGSTY 2.0.12 |
| el10.x86_64 | PIGSTY 2.0.12 | PIGSTY 2.0.12 | PIGSTY 2.0.12 | PIGSTY 2.0.12 | PIGSTY 2.0.12 |
| el10.aarch64 | PIGSTY 2.0.12 | PIGSTY 2.0.12 | PIGSTY 2.0.12 | PIGSTY 2.0.12 | PIGSTY 2.0.12 |
| d12.x86_64 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 |
| d12.aarch64 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 |
| d13.x86_64 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 |
| d13.aarch64 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 |
| u22.x86_64 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 |
| u22.aarch64 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 |
| u24.x86_64 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 |
| u24.aarch64 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 |
| u26.x86_64 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 |
| u26.aarch64 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 | PGDG 2.0.12 |
Source
github.com/pllua/pllua
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
plluau is the untrusted variant of pllua, allowing Lua functions to access the filesystem, load arbitrary modules, and perform operations restricted in the trusted version.
Create Functions
Differences from pllua (Trusted)
| Feature | pllua (trusted) | plluau (untrusted) |
|---|---|---|
| File I/O | Restricted | Full access |
| Module loading | Whitelisted only | Unrestricted |
| OS access | No | Yes |
| Suitable for | User-defined functions | Admin/superuser functions |
Same API as pllua
plluau shares the same SPI interface, trigger support, set-returning functions, and data type handling as pllua. All SPI functions (spi.execute, spi.prepare, spi.rows), coroutine-based set returns, and trigger functions work identically.
Initialization
Configure via GUC (superuser only):
Only superusers can create plluau functions due to the unrestricted access it provides.