[Melbourne-pm] Recent Perl versions and PostgreSQL's pl/perl

Toby Corkindale toby.corkindale at strategicdata.com.au
Mon Jun 30 18:41:37 PDT 2014

Just a warning about using vaguely-recent versions of Perl with PostgreSQL.

The "plperl" language module for PostgreSQL essentially becomes useless once linked against modern Perl, because it is locked down to disable loading new modules, but modern Perl has refactored lots of core features out into modules that are auto-loaded as required.

For instance, a fairly simple regex will try to load the modules: utf8 & re
Since it is forbidden from loading anything, it will fail.

You can still use the unrestricted Perl module, plperlu, but this requires superuser permissions to use, and in the past its use has been discouraged for security.

I've experimented with trying to preload all required modules into the interpreter with the plperl.on_init configuration option in postgresql.conf, but this just changed stored procedure errors from "failed to load module" to "failed to reload module". :/


More information about the Melbourne-pm mailing list