pllua
Lua as a procedural language
pllua : Lua as a 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_pllua |
| See Also | plv8 pljs plperl plperlu pgwasm plpython3u pltcl pg_tle |
| Siblings | hstore_pllua plluau 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
pllua enables writing PostgreSQL functions in Lua (5.3, 5.4, or LuaJIT 2.1).
Create Functions
Data Type Handling
Arguments are automatically converted: integers/floats to Lua numbers, text/varchar to strings, booleans to Lua booleans, NULL to nil. Other types remain as datum objects.
Construct typed values with pgtype:
Composite Types (Rows)
Set-Returning Functions
SPI Database Access
Cursors
Trigger Functions
Trigger fields: trigger.event (INSERT/UPDATE/DELETE), trigger.when (BEFORE/AFTER), trigger.level (ROW/STATEMENT), trigger.new, trigger.old, trigger.row.