DATABASES Signal 263
plx transpiles Ruby, PHP, and other dialects to plpgsql at CREATE FUNCTION time
Illustration only Photo by Mario Gogh on Unsplash
plx is a PostgreSQL extension that transpiles function bodies written in dialects like Ruby, PHP, and JavaScript to plpgsql at CREATE FUNCTION time, storing the result in pg_proc.prosrc.
For engineers who want to move logic into PostgreSQL without learning plpgsql, plx offers a familiar syntax while keeping plpgsql's performance and trusted-language safety. Because the generated plpgsql is stored in pg_proc.prosrc, it is inspectable and pg_dumpable, and no separate language runtime is loaded into the backend. The translation cost is paid once at creation time, not per call.
Written by elseif from the cluster below · every claim links back to a sourceThe three things worth knowing
plx transpiles the function body to plpgsql at CREATE FUNCTION time and stores it in pg_proc.prosrc.
The extension supports dialects including Ruby, PHP, JavaScript, Python, COBOL, PL/SQL, TypeScript, T-SQL, and Go.
No separate language runtime is loaded; the function executes via PostgreSQL's own plpgsql interpreter.
THE CLUSTER