跳转到主要内容

plx

Transpile multiple procedural dialects to PL/pgSQL

plx : Transpile multiple procedural dialects to PL/pgSQL

Overview

ID Extension Package Version Category License Language
3140 plx plx 3.1.0 LANG MIT C
Attribute Has Binary Has Library Need Load Has DDL Relocatable Trusted
--s-d-r No Yes No Yes yes no
Relationships
See Also plpgsql plisql plpgsql_wrap orafce db2fce
2.x NULL interpolation: redeploy function DDL.

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
EXT PIGSTY 3.1.0 19 18 17 16 15 plx -
RPM PIGSTY 3.1.0 19 18 17 16 15 plx_$v -
DEB PIGSTY 3.1.0 19 18 17 16 15 postgresql-$v-plx -
Linux / PG PG19 PG18 PG17 PG16 PG15
el8.x86_64 N/A PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0
el8.aarch64 N/A PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0
el9.x86_64 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0
el9.aarch64 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0
el10.x86_64 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0
el10.aarch64 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0
d12.x86_64 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0
d12.aarch64 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0
d13.x86_64 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0
d13.aarch64 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0
u22.x86_64 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0
u22.aarch64 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0
u24.x86_64 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0
u24.aarch64 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0
u26.x86_64 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0
u26.aarch64 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0 PIGSTY 3.1.0
Package Version OS ORG SIZE File URL
plx_19 3.1.0 el9.x86_64 pigsty 888.3 KiB plx_19-3.1.0-1PGSTY.el9.x86_64.rpm
plx_19 3.1.0 el9.aarch64 pigsty 881.9 KiB plx_19-3.1.0-1PGSTY.el9.aarch64.rpm
plx_19 3.1.0 el10.x86_64 pigsty 903.1 KiB plx_19-3.1.0-1PGSTY.el10.x86_64.rpm
plx_19 3.1.0 el10.aarch64 pigsty 893.7 KiB plx_19-3.1.0-1PGSTY.el10.aarch64.rpm
postgresql-19-plx 3.1.0 d12.x86_64 pigsty 850.5 KiB postgresql-19-plx_3.1.0-1PGSTY~bookworm_amd64.deb
postgresql-19-plx 3.1.0 d12.aarch64 pigsty 826.2 KiB postgresql-19-plx_3.1.0-1PGSTY~bookworm_arm64.deb
postgresql-19-plx 3.1.0 d13.x86_64 pigsty 852.8 KiB postgresql-19-plx_3.1.0-1PGSTY~trixie_amd64.deb
postgresql-19-plx 3.1.0 d13.aarch64 pigsty 829.6 KiB postgresql-19-plx_3.1.0-1PGSTY~trixie_arm64.deb
postgresql-19-plx 3.1.0 u22.x86_64 pigsty 913.3 KiB postgresql-19-plx_3.1.0-1PGSTY~jammy_amd64.deb
postgresql-19-plx 3.1.0 u22.aarch64 pigsty 905.5 KiB postgresql-19-plx_3.1.0-1PGSTY~jammy_arm64.deb
postgresql-19-plx 3.1.0 u24.x86_64 pigsty 895.6 KiB postgresql-19-plx_3.1.0-1PGSTY~noble_amd64.deb
postgresql-19-plx 3.1.0 u24.aarch64 pigsty 888.2 KiB postgresql-19-plx_3.1.0-1PGSTY~noble_arm64.deb
postgresql-19-plx 3.1.0 u26.x86_64 pigsty 889.9 KiB postgresql-19-plx_3.1.0-1PGSTY~resolute_amd64.deb
postgresql-19-plx 3.1.0 u26.aarch64 pigsty 879.5 KiB postgresql-19-plx_3.1.0-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
plx_18 3.1.0 el8.x86_64 pigsty 868.3 KiB plx_18-3.1.0-1PGSTY.el8.x86_64.rpm
plx_18 2.0.1 el8.x86_64 pigsty 316.2 KiB plx_18-2.0.1-1PGSTY.el8.x86_64.rpm
plx_18 3.1.0 el8.aarch64 pigsty 848.3 KiB plx_18-3.1.0-1PGSTY.el8.aarch64.rpm
plx_18 2.0.1 el8.aarch64 pigsty 311.2 KiB plx_18-2.0.1-1PGSTY.el8.aarch64.rpm
plx_18 3.1.0 el9.x86_64 pigsty 888.2 KiB plx_18-3.1.0-1PGSTY.el9.x86_64.rpm
plx_18 2.0.1 el9.x86_64 pigsty 333.0 KiB plx_18-2.0.1-1PGSTY.el9.x86_64.rpm
plx_18 3.1.0 el9.aarch64 pigsty 881.9 KiB plx_18-3.1.0-1PGSTY.el9.aarch64.rpm
plx_18 2.0.1 el9.aarch64 pigsty 329.3 KiB plx_18-2.0.1-1PGSTY.el9.aarch64.rpm
plx_18 3.1.0 el10.x86_64 pigsty 902.9 KiB plx_18-3.1.0-1PGSTY.el10.x86_64.rpm
plx_18 2.0.1 el10.x86_64 pigsty 338.8 KiB plx_18-2.0.1-1PGSTY.el10.x86_64.rpm
plx_18 3.1.0 el10.aarch64 pigsty 893.8 KiB plx_18-3.1.0-1PGSTY.el10.aarch64.rpm
plx_18 2.0.1 el10.aarch64 pigsty 331.9 KiB plx_18-2.0.1-1PGSTY.el10.aarch64.rpm
postgresql-18-plx 3.1.0 d12.x86_64 pigsty 851.0 KiB postgresql-18-plx_3.1.0-1PGSTY~bookworm_amd64.deb
postgresql-18-plx 3.1.0 d12.aarch64 pigsty 826.3 KiB postgresql-18-plx_3.1.0-1PGSTY~bookworm_arm64.deb
postgresql-18-plx 3.1.0 d13.x86_64 pigsty 853.0 KiB postgresql-18-plx_3.1.0-1PGSTY~trixie_amd64.deb
postgresql-18-plx 3.1.0 d13.aarch64 pigsty 829.2 KiB postgresql-18-plx_3.1.0-1PGSTY~trixie_arm64.deb
postgresql-18-plx 3.1.0 u22.x86_64 pigsty 913.3 KiB postgresql-18-plx_3.1.0-1PGSTY~jammy_amd64.deb
postgresql-18-plx 3.1.0 u22.aarch64 pigsty 905.5 KiB postgresql-18-plx_3.1.0-1PGSTY~jammy_arm64.deb
postgresql-18-plx 3.1.0 u24.x86_64 pigsty 895.8 KiB postgresql-18-plx_3.1.0-1PGSTY~noble_amd64.deb
postgresql-18-plx 3.1.0 u24.aarch64 pigsty 888.4 KiB postgresql-18-plx_3.1.0-1PGSTY~noble_arm64.deb
postgresql-18-plx 3.1.0 u26.x86_64 pigsty 889.9 KiB postgresql-18-plx_3.1.0-1PGSTY~resolute_amd64.deb
postgresql-18-plx 3.1.0 u26.aarch64 pigsty 879.2 KiB postgresql-18-plx_3.1.0-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
plx_17 3.1.0 el8.x86_64 pigsty 867.9 KiB plx_17-3.1.0-1PGSTY.el8.x86_64.rpm
plx_17 2.0.1 el8.x86_64 pigsty 316.0 KiB plx_17-2.0.1-1PGSTY.el8.x86_64.rpm
plx_17 3.1.0 el8.aarch64 pigsty 848.3 KiB plx_17-3.1.0-1PGSTY.el8.aarch64.rpm
plx_17 2.0.1 el8.aarch64 pigsty 311.1 KiB plx_17-2.0.1-1PGSTY.el8.aarch64.rpm
plx_17 3.1.0 el9.x86_64 pigsty 888.0 KiB plx_17-3.1.0-1PGSTY.el9.x86_64.rpm
plx_17 2.0.1 el9.x86_64 pigsty 332.8 KiB plx_17-2.0.1-1PGSTY.el9.x86_64.rpm
plx_17 3.1.0 el9.aarch64 pigsty 881.9 KiB plx_17-3.1.0-1PGSTY.el9.aarch64.rpm
plx_17 2.0.1 el9.aarch64 pigsty 329.1 KiB plx_17-2.0.1-1PGSTY.el9.aarch64.rpm
plx_17 3.1.0 el10.x86_64 pigsty 902.6 KiB plx_17-3.1.0-1PGSTY.el10.x86_64.rpm
plx_17 2.0.1 el10.x86_64 pigsty 338.6 KiB plx_17-2.0.1-1PGSTY.el10.x86_64.rpm
plx_17 3.1.0 el10.aarch64 pigsty 893.9 KiB plx_17-3.1.0-1PGSTY.el10.aarch64.rpm
plx_17 2.0.1 el10.aarch64 pigsty 331.6 KiB plx_17-2.0.1-1PGSTY.el10.aarch64.rpm
postgresql-17-plx 3.1.0 d12.x86_64 pigsty 850.5 KiB postgresql-17-plx_3.1.0-1PGSTY~bookworm_amd64.deb
postgresql-17-plx 3.1.0 d12.aarch64 pigsty 826.4 KiB postgresql-17-plx_3.1.0-1PGSTY~bookworm_arm64.deb
postgresql-17-plx 3.1.0 d13.x86_64 pigsty 852.7 KiB postgresql-17-plx_3.1.0-1PGSTY~trixie_amd64.deb
postgresql-17-plx 3.1.0 d13.aarch64 pigsty 828.1 KiB postgresql-17-plx_3.1.0-1PGSTY~trixie_arm64.deb
postgresql-17-plx 3.1.0 u22.x86_64 pigsty 962.2 KiB postgresql-17-plx_3.1.0-1PGSTY~jammy_amd64.deb
postgresql-17-plx 3.1.0 u22.aarch64 pigsty 954.8 KiB postgresql-17-plx_3.1.0-1PGSTY~jammy_arm64.deb
postgresql-17-plx 3.1.0 u24.x86_64 pigsty 895.6 KiB postgresql-17-plx_3.1.0-1PGSTY~noble_amd64.deb
postgresql-17-plx 3.1.0 u24.aarch64 pigsty 888.1 KiB postgresql-17-plx_3.1.0-1PGSTY~noble_arm64.deb
postgresql-17-plx 3.1.0 u26.x86_64 pigsty 889.5 KiB postgresql-17-plx_3.1.0-1PGSTY~resolute_amd64.deb
postgresql-17-plx 3.1.0 u26.aarch64 pigsty 879.1 KiB postgresql-17-plx_3.1.0-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
plx_16 3.1.0 el8.x86_64 pigsty 867.8 KiB plx_16-3.1.0-1PGSTY.el8.x86_64.rpm
plx_16 2.0.1 el8.x86_64 pigsty 316.0 KiB plx_16-2.0.1-1PGSTY.el8.x86_64.rpm
plx_16 3.1.0 el8.aarch64 pigsty 848.0 KiB plx_16-3.1.0-1PGSTY.el8.aarch64.rpm
plx_16 2.0.1 el8.aarch64 pigsty 311.1 KiB plx_16-2.0.1-1PGSTY.el8.aarch64.rpm
plx_16 3.1.0 el9.x86_64 pigsty 887.8 KiB plx_16-3.1.0-1PGSTY.el9.x86_64.rpm
plx_16 2.0.1 el9.x86_64 pigsty 332.9 KiB plx_16-2.0.1-1PGSTY.el9.x86_64.rpm
plx_16 3.1.0 el9.aarch64 pigsty 881.6 KiB plx_16-3.1.0-1PGSTY.el9.aarch64.rpm
plx_16 2.0.1 el9.aarch64 pigsty 329.2 KiB plx_16-2.0.1-1PGSTY.el9.aarch64.rpm
plx_16 3.1.0 el10.x86_64 pigsty 902.5 KiB plx_16-3.1.0-1PGSTY.el10.x86_64.rpm
plx_16 2.0.1 el10.x86_64 pigsty 338.7 KiB plx_16-2.0.1-1PGSTY.el10.x86_64.rpm
plx_16 3.1.0 el10.aarch64 pigsty 893.4 KiB plx_16-3.1.0-1PGSTY.el10.aarch64.rpm
plx_16 2.0.1 el10.aarch64 pigsty 331.7 KiB plx_16-2.0.1-1PGSTY.el10.aarch64.rpm
postgresql-16-plx 3.1.0 d12.x86_64 pigsty 850.0 KiB postgresql-16-plx_3.1.0-1PGSTY~bookworm_amd64.deb
postgresql-16-plx 3.1.0 d12.aarch64 pigsty 825.6 KiB postgresql-16-plx_3.1.0-1PGSTY~bookworm_arm64.deb
postgresql-16-plx 3.1.0 d13.x86_64 pigsty 852.5 KiB postgresql-16-plx_3.1.0-1PGSTY~trixie_amd64.deb
postgresql-16-plx 3.1.0 d13.aarch64 pigsty 828.8 KiB postgresql-16-plx_3.1.0-1PGSTY~trixie_arm64.deb
postgresql-16-plx 3.1.0 u22.x86_64 pigsty 961.5 KiB postgresql-16-plx_3.1.0-1PGSTY~jammy_amd64.deb
postgresql-16-plx 3.1.0 u22.aarch64 pigsty 953.9 KiB postgresql-16-plx_3.1.0-1PGSTY~jammy_arm64.deb
postgresql-16-plx 3.1.0 u24.x86_64 pigsty 895.9 KiB postgresql-16-plx_3.1.0-1PGSTY~noble_amd64.deb
postgresql-16-plx 3.1.0 u24.aarch64 pigsty 887.9 KiB postgresql-16-plx_3.1.0-1PGSTY~noble_arm64.deb
postgresql-16-plx 3.1.0 u26.x86_64 pigsty 889.2 KiB postgresql-16-plx_3.1.0-1PGSTY~resolute_amd64.deb
postgresql-16-plx 3.1.0 u26.aarch64 pigsty 879.0 KiB postgresql-16-plx_3.1.0-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
plx_15 3.1.0 el8.x86_64 pigsty 867.6 KiB plx_15-3.1.0-1PGSTY.el8.x86_64.rpm
plx_15 2.0.1 el8.x86_64 pigsty 315.9 KiB plx_15-2.0.1-1PGSTY.el8.x86_64.rpm
plx_15 3.1.0 el8.aarch64 pigsty 848.5 KiB plx_15-3.1.0-1PGSTY.el8.aarch64.rpm
plx_15 2.0.1 el8.aarch64 pigsty 311.1 KiB plx_15-2.0.1-1PGSTY.el8.aarch64.rpm
plx_15 3.1.0 el9.x86_64 pigsty 882.3 KiB plx_15-3.1.0-1PGSTY.el9.x86_64.rpm
plx_15 2.0.1 el9.x86_64 pigsty 326.4 KiB plx_15-2.0.1-1PGSTY.el9.x86_64.rpm
plx_15 3.1.0 el9.aarch64 pigsty 876.5 KiB plx_15-3.1.0-1PGSTY.el9.aarch64.rpm
plx_15 2.0.1 el9.aarch64 pigsty 324.0 KiB plx_15-2.0.1-1PGSTY.el9.aarch64.rpm
plx_15 3.1.0 el10.x86_64 pigsty 896.2 KiB plx_15-3.1.0-1PGSTY.el10.x86_64.rpm
plx_15 2.0.1 el10.x86_64 pigsty 330.1 KiB plx_15-2.0.1-1PGSTY.el10.x86_64.rpm
plx_15 3.1.0 el10.aarch64 pigsty 888.5 KiB plx_15-3.1.0-1PGSTY.el10.aarch64.rpm
plx_15 2.0.1 el10.aarch64 pigsty 326.9 KiB plx_15-2.0.1-1PGSTY.el10.aarch64.rpm
postgresql-15-plx 3.1.0 d12.x86_64 pigsty 848.8 KiB postgresql-15-plx_3.1.0-1PGSTY~bookworm_amd64.deb
postgresql-15-plx 3.1.0 d12.aarch64 pigsty 824.6 KiB postgresql-15-plx_3.1.0-1PGSTY~bookworm_arm64.deb
postgresql-15-plx 3.1.0 d13.x86_64 pigsty 852.2 KiB postgresql-15-plx_3.1.0-1PGSTY~trixie_amd64.deb
postgresql-15-plx 3.1.0 d13.aarch64 pigsty 827.3 KiB postgresql-15-plx_3.1.0-1PGSTY~trixie_arm64.deb
postgresql-15-plx 3.1.0 u22.x86_64 pigsty 957.3 KiB postgresql-15-plx_3.1.0-1PGSTY~jammy_amd64.deb
postgresql-15-plx 3.1.0 u22.aarch64 pigsty 949.8 KiB postgresql-15-plx_3.1.0-1PGSTY~jammy_arm64.deb
postgresql-15-plx 3.1.0 u24.x86_64 pigsty 889.8 KiB postgresql-15-plx_3.1.0-1PGSTY~noble_amd64.deb
postgresql-15-plx 3.1.0 u24.aarch64 pigsty 882.4 KiB postgresql-15-plx_3.1.0-1PGSTY~noble_arm64.deb
postgresql-15-plx 3.1.0 u26.x86_64 pigsty 883.7 KiB postgresql-15-plx_3.1.0-1PGSTY~resolute_amd64.deb
postgresql-15-plx 3.1.0 u26.aarch64 pigsty 872.4 KiB postgresql-15-plx_3.1.0-1PGSTY~resolute_arm64.deb

Source

pig build pkg plx;		# build rpm/deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install this extension with pig:

pig install plx;		# install via package name, for the active PG version

pig install plx -v 19;   # install for PG 19
pig install plx -v 18;   # install for PG 18
pig install plx -v 17;   # install for PG 17
pig install plx -v 16;   # install for PG 16
pig install plx -v 15;   # install for PG 15

Create this extension with:

CREATE EXTENSION plx;

Usage

Sources:

plx provides familiar procedural-language dialects that transpile to ordinary PL/pgSQL when CREATE FUNCTION runs. PostgreSQL stores and executes the generated PL/pgSQL with its built-in trusted handler; no Ruby, PHP, JavaScript, Python, Go, COBOL, Oracle, or SQL Server runtime is loaded into the backend.

CREATE EXTENSION plx;

Available Dialects

Language Surface syntax
plxruby Ruby
plxphp PHP
plxjs JavaScript
plxts TypeScript annotations over the JavaScript dialect
plxpython3 Python 3
plxgo Go
plxcobol ISO COBOL
plxplsql Oracle PL/SQL
plxtsql Transact-SQL

All dialects target the same PL/pgSQL statement surface, including assignments, conditionals, loops, query iteration, dynamic SQL, cursors, exceptions, triggers, and set-returning functions.

Create a Function

Choose a dialect in the LANGUAGE clause while keeping the function signature in PostgreSQL types:

CREATE FUNCTION grade(score integer)
RETURNS text
LANGUAGE plxruby
AS $$
  grade #:: text
  if score >= 90
    grade = "A"
  elsif score >= 80
    grade = "B"
  else
    grade = "F"
  end
  return grade
$$;

SELECT grade(85);

Translation happens once, when the function is created. The executable body stored in pg_proc.prosrc is regular PL/pgSQL, so it can be dumped, reviewed, and run without a separate interpreter.

Inspect and Debug Generated Code

SELECT pg_get_functiondef('grade(integer)'::regprocedure);
SELECT prosrc
FROM pg_proc
WHERE oid = 'grade(integer)'::regprocedure;

SELECT plx_source('grade(integer)'::regprocedure);

Runtime error line numbers refer to generated PL/pgSQL. plx_source() recovers the original embedded dialect body; use it together with pg_get_functiondef() when correlating an error with the source.

SQL and String Building

Expressions retain PostgreSQL SQL semantics rather than emulating a complete source-language runtime. Use each dialect’s query/execute form for SQL and explicit PostgreSQL types for non-literal expressions. The plx_strbuild expanded-object helper accelerates repeated string appends on PostgreSQL 18:

CREATE FUNCTION labels(n integer)
RETURNS text
LANGUAGE plxjs
AS $$
  let out: text = "";
  for (let i = 1; i <= n; i++) {
    out += `item-${i},`;
  }
  return out;
$$;

The builder remains correct on PostgreSQL 13-17, but its in-place optimization requires PostgreSQL 18.

Boundaries and Caveats

  • plx implements syntax surfaces, not the source languages’ runtimes: there are no gems, Python modules, JavaScript imports, Go goroutines, PHP classes, Oracle packages, or SQL Server transaction commands.
  • Functions run in PL/pgSQL’s trusted sandbox, with no direct filesystem, network, arbitrary native-code, or transaction-control access.
  • Parameters and return types must be PostgreSQL types. Type inference for locals is limited; explicitly declare types for calls and compound expressions.
  • SQL uses three-valued logic and PostgreSQL numeric/string semantics. Source-language truthiness and string concatenation with + are not reproduced.
  • Locals are hoisted into one PL/pgSQL DECLARE block, so block-local scope and redeclaration with a different type are unavailable.

Version 3.0.0 Upgrade

Install the new library and run ALTER EXTENSION plx UPDATE TO '3.0.0', then recreate affected functions from their original dialect DDL. Existing generated PL/pgSQL is not rewritten by the extension update. Keep that source before migration; review functions whose results depend on interpolation, NULL handling or exception exits.

The extension is no longer relocatable. Choose its schema at installation and retain the same schema on restore, or regenerate functions that embed helper names. Creating dialect functions or DO blocks requires USAGE on plpgsql. With function-body checks enabled, creation validates generated PL/pgSQL and rejects unsupported argument/result types and malformed declared types.

Interpolated SQL values are bound as parameters; use ident() for names and restrict deliberate raw() SQL fragments to trusted input. NULL string appends now propagate NULL; use coalesce(x, '') when an empty string is intended. Most dialects now run finally/ensure on return, break and continue, but query cancellation and assertion failures remain outside that handling. Read the dialect-specific breaking changes before redeploying functions.

Lua and C# in 3.1.0

Version 3.1.0 adds the trusted dialects plxlua and plxcsharp. Lua includes block-scoped locals, numeric and query loops, exceptions and selected standard-library functions. C# includes typed declarations, interpolated strings, filtered exceptions, switch expressions and query/array iteration. These remain transpilers to PL/pgSQL; their documented semantic differences matter and no Lua or .NET runtime is loaded. Existing dialect behavior is unchanged.

Install the new library and replace old-library sessions, or restart the server, then run ALTER EXTENSION plx UPDATE TO '3.1.0'; as a superuser in each database. The update adds the two languages and their handlers while retaining existing objects. Both dialects require USAGE on plpgsql and bind interpolated values as SQL parameters.

表格阅读器