Running Node.js inside Postgres, Part Mea Culpa

Previously, I wrote about trying to run node.js code in PLV8 in Postgres. Unfortunately, that effort sputtered out once I found out that PLV8 is a ‘trusted’ languagefor postgres. As documented for PL/Perl:

Normally, PL/Perl is installed as a “trusted” programming language named plperl. In this setup, certain Perl operations are disabled to preserve security. In general, the operations that are restricted are those that interact with the environment. This includes file handle operations, require, and use (for external modules). There is no way to access internals of the database server process or to gain OS-level access with the permissions of the server process, as a C function can do. Thus, any unprivileged database user can be permitted to use this language.

So, no filesystem access means no unix socket access, which means no network access. ¯\_(ツ)_/¯

If plv8u lands, I can revisit my previous goal, but until then…