Reapply "nixos/postgresql: add docs about procedural languages"
This reverts commit a4006e4970.
This commit is contained in:
@@ -1253,6 +1253,9 @@
|
||||
"module-services-postgres-plugins": [
|
||||
"index.html#module-services-postgres-plugins"
|
||||
],
|
||||
"module-services-postgres-pls": [
|
||||
"index.html#module-services-postgres-pls"
|
||||
],
|
||||
"module-services-postgres-jit": [
|
||||
"index.html#module-services-postgres-jit"
|
||||
],
|
||||
|
||||
@@ -328,6 +328,37 @@ self: super: {
|
||||
}
|
||||
```
|
||||
|
||||
## Procedural Languages {#module-services-postgres-pls}
|
||||
|
||||
PostgreSQL ships the additional procedural languages PL/Perl, PL/Python and PL/Tcl as extensions.
|
||||
They are packaged as plugins and can be made available in the same way as external extensions:
|
||||
```nix
|
||||
{
|
||||
services.postgresql.extensions = ps: with ps; [
|
||||
plperl
|
||||
plpython3
|
||||
pltcl
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
Each procedural language plugin provides a `.withPackages` helper to make language specific packages available at run-time.
|
||||
|
||||
For example, to make `python3Packages.base58` available:
|
||||
```nix
|
||||
{
|
||||
services.postgresql.extensions = pgps: with pgps; [
|
||||
(plpython3.withPackages (pyps: with pyps; [ base58 ]))
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
This currently works for:
|
||||
- `plperl` by re-using `perl.withPackages`
|
||||
- `plpython3` by re-using `python3.withPackages`
|
||||
- `plr` by exposing `rPackages`
|
||||
- `pltcl` by exposing `tclPackages`
|
||||
|
||||
## JIT (Just-In-Time compilation) {#module-services-postgres-jit}
|
||||
|
||||
[JIT](https://www.postgresql.org/docs/current/jit-reason.html)-support in the PostgreSQL package
|
||||
|
||||
Reference in New Issue
Block a user