Repository navigation
plx 3.0.0
Major release. It holds the fixes from a security audit, a code audit of every dialect, and five rounds of adversarial review. Many fixes make a function compute what its source language computes, and others reject code that 2.0.0 accepted, so a function can behave differently once you re-create it under 3.0.0. A function that already exists keeps its plpgsql and behaves as before until its CREATE FUNCTION runs again.
Read Breaking changes and Upgrading in CHANGELOG.md before you install.
Upgrading from 2.0.0
You need superuser access to the server and to each database that has plx.
-
Install the new build on the server.
-
Restart the server, or start new sessions, so that they load the new build.
-
Right after step 2, before anyone creates or replaces a plx function, run in each database that has plx:
ALTER EXTENSION plx UPDATE;Until step 3 runs, a new function that uses a string append, or a plxtsql conversion to an integer type of a value whose type plx cannot see, is created without an error but fails on every call.
Highlights
- Security. Fixes backend crashes, string-literal breakouts and transpiler denial of service reachable by any role. Interpolated values in SQL are now bound as parameters (
ident(),literal()andraw()are added for the other cases). plx's own objects are schema-qualified in generated code, and the extension is no longer relocatable. A plx language now needs USAGE on plpgsql. - Correctness.
finallyruns once, including onreturn,breakandcontinue. Many dialect-specific fixes so that results match the source language; see the CHANGELOG for each dialect. - Docs. Corrected factual errors, stale text and broken links; the security model is described in the user guide.
Verification
CI green on PostgreSQL 13 through 18. Locally on 13 through 18: 24/24 installcheck, the differential check with no unexplained divergence, 300/300 finally cases, 39/39 corpus programs, and make upgradecheck, which includes two attempts by a table owner to gain superuser during ALTER EXTENSION plx UPDATE. make metacheck passes.