RDS has some languages already installed, but they do not allow you to install any package which isn't already there.
From the RDS documentation on Extensions for PostgreSQL 9.6:
The following table shows PostgreSQL extensions for PostgreSQL version 9.6.x that are currently supported by PostgreSQL on Amazon RDS. "N/A" indicates that the extension is not available for that PostgreSQL version. [...]
[...]
plls 1.5.3
plperl 1.0
plpgsql
[...]
postgres_fdw
[...]
PLPERLu is not in the list.
They won't let you install the untrusted version of PERL. This could compromise their systems.
(Untested) workaround
So, if you really need this feature, you'll have to install PostgreSQL on you own (virtual) machine (or Docker), and use it there.
You can profit from PLPERLu in your box from RDS via some trickery with PostgreSQL FDW
and triggers
- Setup your main (constrained) database at RDS.
- Setup your aux (unconstrained) database at your own box...
- Link the two together using
postgres_fdw
from main to aux.
- You cannot call directly a function via FDW. But you can have one table with an
INSERT or UPDATE TRIGGER
that performs the function call you're interested. This table could have a structure (parameter1, parameter2, ... , parameterN, result)
, and the trigger could be fired when you INSERT or UPDATE
, to generate the column new.result
.
NOTES:
- I've never tried this.
- I don't know which connectivity restrictions does RDS put to
postgres_fdw
or other data wrappers. They may restrict which are the permitted connection IP addresses, and this might make RDS unable to reach your aux database.